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/06/25 12:00:11 UTC

[GitHub] [airflow] feluelle commented on a change in pull request #9512: Extract common date log logic in _run_raw_task

feluelle commented on a change in pull request #9512:
URL: https://github.com/apache/airflow/pull/9512#discussion_r445504606



##########
File path: airflow/models/taskinstance.py
##########
@@ -930,6 +930,12 @@ def check_and_change_state_before_execution(
                 self.log.info("Executing %s on %s", self.task, self.execution_date)
         return True
 
+    def _date_or_empty(self, attr):
+        if hasattr(self, attr):
+            date = getattr(self, attr)
+            return date.strftime('%Y%m%dT%H%M%S') if date else ''

Review comment:
       ```suggestion
               if date:
                   return date.strftime('%Y%m%dT%H%M%S')
   ```




----------------------------------------------------------------
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