@@ -61,10 +61,9 @@ def __eq__(self, other) -> bool:
6161 def is_scheduled_task (self ) -> bool :
6262 return self .meta .get ("scheduled_task_id" , None ) is not None
6363
64- def is_execution_of (self , task : "ScheduledTask" ) -> bool :
65- return (
66- self .meta .get ("task_type" , None ) == task .TASK_TYPE and self .meta .get ("scheduled_task_id" , None ) == task .id
67- )
64+ def is_execution_of (self , task : "ScheduledTask" ) -> bool : # noqa: F821
65+ return (self .meta .get ("task_type" , None ) == task .TASK_TYPE
66+ and self .meta .get ("scheduled_task_id" , None ) == task .id )
6867
6968 def stop_execution (self , connection : ConnectionType ):
7069 send_stop_job_command (connection , self .id )
@@ -92,11 +91,11 @@ def __str__(self):
9291 return f"{ self .name } /{ ',' .join (self .queue_names ())} "
9392
9493 def _start_scheduler (
95- self ,
96- burst : bool = False ,
97- logging_level : str = "INFO" ,
98- date_format : str = "%H:%M:%S" ,
99- log_format : str = "%(asctime)s %(message)s" ,
94+ self ,
95+ burst : bool = False ,
96+ logging_level : str = "INFO" ,
97+ date_format : str = "%H:%M:%S" ,
98+ log_format : str = "%(asctime)s %(message)s" ,
10099 ) -> None :
101100 """Starts the scheduler process.
102101 This is specifically designed to be run by the worker when running the `work()` method.
0 commit comments