john-jac commented on a change in pull request #19173:
URL: https://github.com/apache/airflow/pull/19173#discussion_r735726251
##########
File path: airflow/dag_processing/processor.py
##########
@@ -414,16 +414,19 @@ def manage_slas(self, dag: DAG, session: Session = None)
-> None:
sla_misses = []
next_info =
dag.next_dagrun_info(dag.get_run_data_interval(ti.dag_run), restricted=False)
- while next_info.logical_date < ts:
- next_info = dag.next_dagrun_info(next_info.data_interval,
restricted=False)
- if next_info.logical_date + task.sla < ts:
- sla_miss = SlaMiss(
- task_id=ti.task_id,
- dag_id=ti.dag_id,
- execution_date=next_info.logical_date,
- timestamp=ts,
- )
- sla_misses.append(sla_miss)
+ if next_info is None:
+ self.log.info("Skipping SLA check for %s because task does not
have scheduled date", ti)
+ else:
+ while next_info.logical_date < ts:
+ next_info = dag.next_dagrun_info(next_info.data_interval,
restricted=False)
Review comment:
Done!
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]