airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sajjad Hussain (JIRA)" <>
Subject [jira] [Created] (AIRFLOW-557) SLA notification does not work for manually triggered DAGs
Date Fri, 07 Oct 2016 21:41:20 GMT
Sajjad Hussain created AIRFLOW-557:

             Summary: SLA notification does not work for manually triggered DAGs 
                 Key: AIRFLOW-557
             Project: Apache Airflow
          Issue Type: Bug
            Reporter: Sajjad Hussain

No SLA notifcation emails are sent for manually triggered DAGs.

For example, if you have ...
dag = DAG(
    start_date=datetime(2015, 1, 1),

t = PythonOperator(
There is no email sent if the task takes more than the SLA time.

The code for DAG.following_schedule does not seem to handle the case of scheduler_interval=None
   def following_schedule(self, dttm):
        if isinstance(self._schedule_interval, six.string_types):
            cron = croniter(self._schedule_interval, dttm)
            return cron.get_next(datetime)
        elif isinstance(self._schedule_interval, timedelta):
            return dttm + self._schedule_interval

When the DAG has schedule_interval=None, the following exception is raised ...

File "<...>/lib/python2.7/site-packages/airflow/", line 284, in manage_slas
     while dttm <
TypeError: can't compare datetime.datetime to NoneType

This message was sent by Atlassian JIRA

View raw message