now = datetime.now() now_to_the_hour = now.replace(hour=now.time().hour, minute=0, second=0, microsecond=0) START_DATE = now_to_the_hour + timedelta(hours=-3) DAG_NAME = 'ep_telemetry_v2' ORG_IDS = get_active_org_ids_string() default_args = { 'owner': 'sanand', 'depends_on_past': True, 'pool': 'ep_data_pipeline', 'start_date': START_DATE, 'email': [import_ep_pipeline_alert_email_dl], 'email_on_failure': import_airflow_enable_notifications, 'email_on_retry': import_airflow_enable_notifications, 'retries': 10, 'retry_delay': timedelta(seconds=30), 'priority_weight': import_airflow_priority_weight } dag = DAG(DAG_NAME, schedule_interval='@hourly', default_args=default_args, sla_miss_callback=sla_alert_func)