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 2019/01/14 10:01:37 UTC

[GitHub] ashb commented on a change in pull request #4492: [AIRFLOW-3592] Fix logs when task is in rescheduled state

ashb commented on a change in pull request #4492: [AIRFLOW-3592] Fix logs when task is in rescheduled state
URL: https://github.com/apache/airflow/pull/4492#discussion_r247433944
 
 

 ##########
 File path: airflow/www/views.py
 ##########
 @@ -869,7 +869,13 @@ def log(self, session=None):
             models.TaskInstance.task_id == task_id,
             models.TaskInstance.execution_date == dttm).first()
 
-        logs = [''] * (ti.next_try_number - 1 if ti is not None else 0)
+        num_logs = 0
+        if ti is not None:
+            num_logs = ti.next_try_number - 1
 
 Review comment:
   I never was happy with this whole next_try_number hack - I should find time to have one row per try instead
   of a row per TI that gets altered.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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