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 2021/02/04 11:34:48 UTC

[GitHub] [airflow] turbaszek commented on a change in pull request #14064: Skip SLA check only if SLA is None

turbaszek commented on a change in pull request #14064:
URL: https://github.com/apache/airflow/pull/14064#discussion_r570153673



##########
File path: airflow/jobs/scheduler_job.py
##########
@@ -419,7 +419,7 @@ def manage_slas(self, dag: DAG, session: Session = None) -> None:
         ts = timezone.utcnow()
         for ti in max_tis:
             task = dag.get_task(ti.task_id)
-            if not isinstance(task.sla, timedelta):
+            if not task.sla:

Review comment:
       Yes, but in my opinion this is better than not knowing why SLA was not send. To avoid run time errors I think about adding a check to task constructor to fail as soon as possible - WDYT?




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