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/15 23:03:54 UTC

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

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

 ##########
 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:
   There is already the `task_fail` table which has one row per try. But only in case the task failed and is retried. However when a task is cleared (via UI) then there is no indication why there are more tries. 

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