Skip to content

Commit dcbd0d5

Browse files
committed
Fix lints
Signed-off-by: Sreekanth <prsreekanth920@gmail.com>
1 parent e1e91ba commit dcbd0d5

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

packages/pynumaflow/pynumaflow/sinker/async_server.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ async def _watch_for_shutdown():
168168
"""Wait for the shutdown event and stop the server with a grace period."""
169169
await shutdown_event.wait()
170170
_LOGGER.info("Shutdown signal received, stopping server gracefully...")
171-
# Stop accepting new requests and wait for a maximum of 5 seconds for existing requests to complete
171+
# Stop accepting new requests and wait for a maximum of 5 seconds
172+
# for in-flight requests to complete
172173
await server.stop(5)
173174

174175
shutdown_task = asyncio.create_task(_watch_for_shutdown())
@@ -182,8 +183,10 @@ async def _watch_for_shutdown():
182183
await shutdown_task
183184

184185
_LOGGER.info("Stopping event loop...")
185-
# We use aiorun to manage the event loop. The aiorun.run() runs forever until loop.stop() is called.
186-
# If we don't stop the event loop explicitly here, the python process will not exit.
187-
# It reamins stuck for 5 minutes until liveness and readiness probe fails enough times and k8s sends a SIGTERM
186+
# We use aiorun to manage the event loop. The aiorun.run() runs
187+
# forever until loop.stop() is called. If we don't stop the
188+
# event loop explicitly here, the python process will not exit.
189+
# It reamins stuck for 5 minutes until liveness and readiness probe
190+
# fails enough times and k8s sends a SIGTERM
188191
asyncio.get_event_loop().stop()
189192
_LOGGER.info("Event loop stopped")

0 commit comments

Comments
 (0)