@@ -600,7 +600,13 @@ async def job_failed(exc: BaseException) -> None:
600600
601601 await asyncio .shield (
602602 self .finish_job (
603- job_id , finish , result_data , result_timeout_s , keep_result_forever , incr_score , keep_in_progress ,
603+ job_id ,
604+ finish ,
605+ result_data ,
606+ result_timeout_s ,
607+ keep_result_forever ,
608+ incr_score ,
609+ keep_in_progress ,
604610 )
605611 )
606612
@@ -642,7 +648,9 @@ async def finish_failed_job(self, job_id: str, result_data: Optional[bytes]) ->
642648 await conn .unwatch ()
643649 tr = conn .multi_exec ()
644650 tr .delete (
645- retry_key_prefix + job_id , in_progress_key_prefix + job_id , job_key_prefix + job_id ,
651+ retry_key_prefix + job_id ,
652+ in_progress_key_prefix + job_id ,
653+ job_key_prefix + job_id ,
646654 )
647655 tr .zrem (abort_jobs_ss , job_id )
648656 tr .zrem (self .queue_name , job_id )
@@ -798,5 +806,4 @@ def check_health(settings_cls: 'WorkerSettingsType') -> int:
798806 redis_settings = cast (Optional [RedisSettings ], cls_kwargs .get ('redis_settings' ))
799807 health_check_key = cast (Optional [str ], cls_kwargs .get ('health_check_key' ))
800808 queue_name = cast (Optional [str ], cls_kwargs .get ('queue_name' ))
801- loop = asyncio .get_event_loop ()
802- return loop .run_until_complete (async_check_health (redis_settings , health_check_key , queue_name ))
809+ return asyncio .run (async_check_health (redis_settings , health_check_key , queue_name ))
0 commit comments