@@ -145,15 +145,7 @@ def _get_queue_intermittently():
145
145
if shutdown_event .is_set ():
146
146
logger .info (f"Shutdown signal received in future { process_id } " )
147
147
raise asyncio .CancelledError ()
148
- # return None
149
-
150
- try :
151
- return await asyncio .to_thread (_get_queue_intermittently ) # type: ignore[attr-defined]
152
- except asyncio .CancelledError :
153
- logger .info ("kaki" )
154
- # return None
155
- raise
156
- # raise
148
+ return await asyncio .to_thread (_get_queue_intermittently ) # type: ignore[attr-defined]
157
149
158
150
async def send_result (
159
151
self ,
@@ -305,9 +297,10 @@ async def _wait_for_shutdown(
305
297
while not shutdown_event .is_set ():
306
298
await asyncio .sleep (shutdown_poll_interval )
307
299
308
- logger .debug ("Shutdown signal received" )
300
+ # Raising asyncio.CancelledError instead would
301
+ # cause the asyncio.wait above to wait
302
+ # forever, couldn't find a reasonable reason why
309
303
raise ShutdownSignalReceived ("Shutdown event set, cancelling process loop." )
310
- # raise asyncio.CancelledError("Shutdown event set, cancelling process loop.")
311
304
312
305
async def _process_synchronous_requests_loop (
313
306
self ,
@@ -352,7 +345,6 @@ async def _process_asynchronous_requests_loop(
352
345
raise ValueError ("Async worker called with max_concurrency < 1" )
353
346
354
347
while True :
355
- logger .info ("Awaiting request..." )
356
348
process_request = await self .get_request (
357
349
requests_queue = requests_queue ,
358
350
shutdown_event = shutdown_event ,
0 commit comments