Skip to content

Commit 6b360ac

Browse files
committed
Use get_running_loop instead of get_event_loop
Signed-off-by: Sreekanth <prsreekanth920@gmail.com>
1 parent f5f73ce commit 6b360ac

9 files changed

Lines changed: 9 additions & 9 deletions

File tree

packages/pynumaflow/pynumaflow/accumulator/async_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,5 +239,5 @@ async def _watch_for_shutdown():
239239
# event loop explicitly here, the python process will not exit.
240240
# It reamins stuck for 5 minutes until liveness and readiness probe
241241
# fails enough times and k8s sends a SIGTERM
242-
asyncio.get_event_loop().stop()
242+
asyncio.get_running_loop().stop()
243243
_LOGGER.info("Event loop stopped")

packages/pynumaflow/pynumaflow/batchmapper/async_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,5 +174,5 @@ async def _watch_for_shutdown():
174174
# event loop explicitly here, the python process will not exit.
175175
# It reamins stuck for 5 minutes until liveness and readiness probe
176176
# fails enough times and k8s sends a SIGTERM
177-
asyncio.get_event_loop().stop()
177+
asyncio.get_running_loop().stop()
178178
_LOGGER.info("Event loop stopped")

packages/pynumaflow/pynumaflow/mapper/async_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,5 +172,5 @@ async def _watch_for_shutdown():
172172
# event loop explicitly here, the python process will not exit.
173173
# It reamins stuck for 5 minutes until liveness and readiness probe
174174
# fails enough times and k8s sends a SIGTERM
175-
asyncio.get_event_loop().stop()
175+
asyncio.get_running_loop().stop()
176176
_LOGGER.info("Event loop stopped")

packages/pynumaflow/pynumaflow/mapstreamer/async_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,5 +193,5 @@ async def _watch_for_shutdown():
193193
# event loop explicitly here, the python process will not exit.
194194
# It reamins stuck for 5 minutes until liveness and readiness probe
195195
# fails enough times and k8s sends a SIGTERM
196-
asyncio.get_event_loop().stop()
196+
asyncio.get_running_loop().stop()
197197
_LOGGER.info("Event loop stopped")

packages/pynumaflow/pynumaflow/reducer/async_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,5 +225,5 @@ async def _watch_for_shutdown():
225225
# event loop explicitly here, the python process will not exit.
226226
# It reamins stuck for 5 minutes until liveness and readiness probe
227227
# fails enough times and k8s sends a SIGTERM
228-
asyncio.get_event_loop().stop()
228+
asyncio.get_running_loop().stop()
229229
_LOGGER.info("Event loop stopped")

packages/pynumaflow/pynumaflow/reducestreamer/async_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,5 +237,5 @@ async def _watch_for_shutdown():
237237
await shutdown_task
238238

239239
_LOGGER.info("Stopping event loop...")
240-
asyncio.get_event_loop().stop()
240+
asyncio.get_running_loop().stop()
241241
_LOGGER.info("Event loop stopped")

packages/pynumaflow/pynumaflow/sinker/async_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,5 +196,5 @@ async def _watch_for_shutdown():
196196
# event loop explicitly here, the python process will not exit.
197197
# It reamins stuck for 5 minutes until liveness and readiness probe
198198
# fails enough times and k8s sends a SIGTERM
199-
asyncio.get_event_loop().stop()
199+
asyncio.get_running_loop().stop()
200200
_LOGGER.info("Event loop stopped")

packages/pynumaflow/pynumaflow/sourcer/async_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,5 +233,5 @@ async def _watch_for_shutdown():
233233
# event loop explicitly here, the python process will not exit.
234234
# It reamins stuck for 5 minutes until liveness and readiness probe
235235
# fails enough times and k8s sends a SIGTERM
236-
asyncio.get_event_loop().stop()
236+
asyncio.get_running_loop().stop()
237237
_LOGGER.info("Event loop stopped")

packages/pynumaflow/pynumaflow/sourcetransformer/async_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,5 +195,5 @@ async def _watch_for_shutdown():
195195
# event loop explicitly here, the python process will not exit.
196196
# It reamins stuck for 5 minutes until liveness and readiness probe
197197
# fails enough times and k8s sends a SIGTERM
198-
asyncio.get_event_loop().stop()
198+
asyncio.get_running_loop().stop()
199199
_LOGGER.info("Event loop stopped")

0 commit comments

Comments
 (0)