File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -249,11 +249,20 @@ async def finalize() -> None:
249249 if self ._event_listeners_timeout :
250250 await self .event_manager .wait_for_all_listeners_to_complete (timeout = self ._event_listeners_timeout )
251251
252- await self .event_manager .__aexit__ (None , None , None )
253- await self ._charging_manager_implementation .__aexit__ (None , None , None )
252+ for cleanup_step in [
253+ self .event_manager .__aexit__ ,
254+ self ._charging_manager_implementation .__aexit__ ,
255+ ]:
256+ try :
257+ await cleanup_step (None , None , None )
258+ except Exception :
259+ self .log .exception (f'Cleanup step failed: { cleanup_step } ' )
254260
255261 # Persist Actor state
256- await self ._save_actor_state ()
262+ try :
263+ await self ._save_actor_state ()
264+ except Exception :
265+ self .log .exception ('Failed to save Actor state' )
257266
258267 try :
259268 await asyncio .wait_for (finalize (), self ._cleanup_timeout .total_seconds ())
You can’t perform that action at this time.
0 commit comments