You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "t oo (Jira)" <ji...@apache.org> on 2019/12/26 16:13:00 UTC

[jira] [Created] (AIRFLOW-6358) print details of failed task

t oo created AIRFLOW-6358:
-----------------------------

             Summary: print details of failed task
                 Key: AIRFLOW-6358
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-6358
             Project: Apache Airflow
          Issue Type: Improvement
          Components: logging
    Affects Versions: 1.10.6
            Reporter: t oo


task instance.py

 

BEFORE

self.state = State.FAILED
 if task.retries:
 self.log.info('All retries failed; marking task as FAILED')
 else:
 self.log.info('Marking task as FAILED.')
 if task.email_on_failure and task.email:
 self.email_alert(error)

 

AFTER

self.state = State.FAILED
 if task.retries:
 self.log.info('All retries failed; marking task as FAILED. dag_id=%s, task_id=%s, execution_date=%s, start_date=%s, end_date=%s', self.dag_id, self.task_id, self.execution_date.strftime('%Y%m%dT%H%M%S'), self.start_date.strftime('%Y%m%dT%H%M%S'), self.end_date.strftime('%Y%m%dT%H%M%S'))
 else:
 self.log.info('Marking task as FAILED. dag_id=%s, task_id=%s, execution_date=%s, start_date=%s, end_date=%s', self.dag_id, self.task_id, self.execution_date.strftime('%Y%m%dT%H%M%S'), self.start_date.strftime('%Y%m%dT%H%M%S'), self.end_date.strftime('%Y%m%dT%H%M%S'))
 if task.email_on_failure and task.email:
 self.email_alert(error)

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)