File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -311,22 +311,22 @@ async def shutdown_units() -> None:
311311
312312 shutdown_future = asyncio .run_coroutine_threadsafe (shutdown_units (), loop = loop )
313313 try :
314- shutdown_future .result (timeout = 5.0 )
314+ shutdown_future .result ()
315315 except KeyboardInterrupt :
316+ logger .warning ("Interrupted during unit shutdown. This may indicate units with slow shutdown methods."
317+ "Re-trying... Press ctrl-c again to terminate immediately." )
316318 shutdown_future .result ()
317- except TimeoutError :
318- logger .warning ("Timed out waiting for unit shutdown" )
319-
320- # for cache in MessageCache.values():
321- # cache.clear()
322319
323320 revert_future = asyncio .run_coroutine_threadsafe (context .revert (), loop = loop )
324321 try :
325- revert_future .result (timeout = 5.0 )
326- except KeyboardInterrupt :
327322 revert_future .result ()
328- except TimeoutError :
329- logger .warning ("Timed out waiting for context revert" )
323+ except KeyboardInterrupt :
324+ logger .warning ("Interrupted during context revert."
325+ "Re-trying... (will timeout in 10 seconds)" )
326+ try :
327+ revert_future .result (timeout = 10.0 )
328+ except TimeoutError :
329+ logger .warning ("Timed out waiting for retry on context revert" )
330330
331331 logger .debug (f"Remaining tasks in event loop = { asyncio .all_tasks (loop )} " )
332332
You can’t perform that action at this time.
0 commit comments