File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -44,12 +44,12 @@ async def shutdown_broker(broker: AsyncBroker, timeout: float) -> None:
44
44
try :
45
45
ret_val = await asyncio .wait_for (broker .shutdown (), timeout ) # type: ignore
46
46
if ret_val is not None :
47
- logger .info ("Broker returned value on shutdown: '%s'" , str (ret_val ))
47
+ logger .info ("Broker has returned value on shutdown: '%s'" , str (ret_val ))
48
48
except asyncio .TimeoutError :
49
- logger .warning ("Cannot shutdown broker gracefully. Timed out." )
49
+ logger .warning ("Broker. shutdown cannot be completed in %s seconds." , timeout )
50
50
except Exception as exc :
51
51
logger .warning (
52
- "Exception found while terminating : %s" ,
52
+ "Exception found while shutting down broker : %s" ,
53
53
exc ,
54
54
exc_info = True ,
55
55
)
@@ -151,8 +151,7 @@ def interrupt_handler(signum: int, _frame: Any) -> None:
151
151
** receiver_kwargs , # type: ignore
152
152
)
153
153
loop .run_until_complete (receiver .listen (shutdown_event ))
154
- except KeyboardInterrupt :
155
- logger .warning ("Worker process interrupted." )
154
+ finally :
156
155
loop .run_until_complete (shutdown_broker (broker , args .shutdown_timeout ))
157
156
158
157
You can’t perform that action at this time.
0 commit comments