Skip to content

Commit 8dafd22

Browse files
committed
shutdown eventloop
Signed-off-by: Sreekanth <prsreekanth920@gmail.com>
1 parent 93412af commit 8dafd22

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

packages/pynumaflow/poetry.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/pynumaflow/pynumaflow/sinker/async_server.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,14 @@ async def _watch_for_shutdown():
173173
shutdown_task = asyncio.create_task(_watch_for_shutdown())
174174
await server.wait_for_termination()
175175

176+
176177
# Propagate error so start() can exit with a non-zero code
177178
self._error = self.servicer._error
178179

179180
shutdown_task.cancel()
180181
with contextlib.suppress(asyncio.CancelledError):
181182
await shutdown_task
183+
184+
_LOGGER.info("Stopping event loop...")
185+
asyncio.get_event_loop().stop()
186+
_LOGGER.info("Event loop stopped")

packages/pynumaflow/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ grpcio-tools = "^1.48.1"
2828
google-api-core = "^2.11.0"
2929
grpcio-status = "^1.48.1"
3030
protobuf = ">=6.31.1,<7.0"
31-
aiorun = "^2023.7"
31+
aiorun = "^2025.1.1"
3232
uvloop = ">=0.21.0"
3333
psutil = "^6.0.0"
3434

0 commit comments

Comments
 (0)