@@ -135,9 +135,7 @@ def execute_tasks(self, tasks: List[Task], log: BoundLogger) -> bool:
135135
136136 hard_timeouts = self .worker .get_hard_timeouts (func , tasks )
137137
138- with WorkerContextManagerStack (
139- self .config ["CHILD_CONTEXT_MANAGERS" ]
140- ):
138+ with WorkerContextManagerStack (self .config ["CHILD_CONTEXT_MANAGERS" ]):
141139 if is_batch_func :
142140 # Batch process if the task supports it.
143141 g ["current_tasks" ] = tasks
@@ -165,9 +163,7 @@ def execute_tasks(self, tasks: List[Task], log: BoundLogger) -> bool:
165163 execution ["time_failed" ] = time .time ()
166164 if self .worker .store_tracebacks :
167165 # Currently we only log failed task executions to Redis.
168- execution ["traceback" ] = "" .join (
169- traceback .format_exception (* exc_info )
170- )
166+ execution ["traceback" ] = "" .join (traceback .format_exception (* exc_info ))
171167 execution ["success" ] = success
172168 execution ["host" ] = socket .gethostname ()
173169
@@ -360,9 +356,7 @@ def check_child_exit() -> Optional[int]:
360356 execution = {
361357 "time_started" : time_started ,
362358 "time_failed" : now ,
363- "exception_name" : serialize_func_name (
364- JobTimeoutException
365- ),
359+ "exception_name" : serialize_func_name (JobTimeoutException ),
366360 "success" : False ,
367361 "host" : socket .gethostname (),
368362 }
0 commit comments