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



##########
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:
       I think a better fix would be something like:
   
   ```python
   if task.sla and not isinstance(task.sla, timedelta):
        raise("Expected timedelta object, got %s instead: %s", type(task.sla), 
task.sla)
   ```
   
   This would help users understand what's the problem 




----------------------------------------------------------------
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:
[email protected]


Reply via email to