File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/etos_api/routers/etos Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -110,10 +110,15 @@ async def start_etos(etos: StartEtosRequest):
110110
111111 LOGGER .info ("Start event publisher." )
112112 await sync_to_async (etos_library .start_publisher )
113+ await sync_to_async (etos_library .publisher .wait_start )
113114 LOGGER .info ("Event published started successfully." )
114115 LOGGER .info ("Publish TERCC event." )
115- async with aclosing ( etos_library . publisher ) :
116+ try :
116117 event = etos_library .events .send (tercc , links , data )
118+ await sync_to_async (etos_library .publisher .wait_for_unpublished_events )
119+ finally :
120+ await sync_to_async (etos_library .publisher .stop )
121+ await sync_to_async (etos_library .publisher .wait_close )
117122 LOGGER .info ("Event published." )
118123
119124 LOGGER .info ("ETOS triggered successfully." )
You can’t perform that action at this time.
0 commit comments