uranusjr commented on a change in pull request #17967:
URL: https://github.com/apache/airflow/pull/17967#discussion_r700779016



##########
File path: airflow/task/task_runner/standard_task_runner.py
##########
@@ -84,7 +84,8 @@ def _start_by_fork(self):
             try:
                 args.func(args, dag=self.dag)
                 return_code = 0
-            except Exception:
+            except Exception as task_launch_exception:
+                self.log.exception(task_launch_exception)

Review comment:
       This will show `task_launch_exception` *twice*. The message should be 
something else, e.g.
   
   ```python
   try:
       ...
   except Exception:
       self.log.exception(
           "Failed to execute job %s fo task %s",
           self._task_instance.job_id,
           self._task_instance.task_id,
       )
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to