You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/01/05 18:47:57 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #6956: [AIRFLOW-6387] print details of success/skipped task

potiuk commented on a change in pull request #6956: [AIRFLOW-6387] print details of success/skipped task
URL: https://github.com/apache/airflow/pull/6956#discussion_r363110082
 
 

 ##########
 File path: airflow/models/taskinstance.py
 ##########
 @@ -964,11 +964,23 @@ def signal_handler(signum, frame):
             self.refresh_from_db(lock_for_update=True)
             self.state = State.SUCCESS
         except AirflowSkipException as e:
+            # Recording SKIP
             # log only if exception has any arguments to prevent log flooding
             if e.args:
                 self.log.info(e)
             self.refresh_from_db(lock_for_update=True)
             self.state = State.SKIPPED
+            try:
+                self.log.info(
+                    'Marking task as SKIPPED.'
+                    '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') if self.execution_date else '',
+                    self.start_date.strftime('%Y%m%dT%H%M%S') if self.start_date else '',
 
 Review comment:
   ```suggestion
                       self.start_date.strftime('%Y%m%dT%H%M%S') if hasattr('start_date') and self.start_date else '',
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services