@@ -61,10 +61,9 @@ def __eq__(self, other) -> bool:
61
61
def is_scheduled_task (self ) -> bool :
62
62
return self .meta .get ("scheduled_task_id" , None ) is not None
63
63
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 )
68
67
69
68
def stop_execution (self , connection : ConnectionType ):
70
69
send_stop_job_command (connection , self .id )
@@ -92,11 +91,11 @@ def __str__(self):
92
91
return f"{ self .name } /{ ',' .join (self .queue_names ())} "
93
92
94
93
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" ,
100
99
) -> None :
101
100
"""Starts the scheduler process.
102
101
This is specifically designed to be run by the worker when running the `work()` method.
0 commit comments