Skip to content

Instantly share code, notes, and snippets.

@r39132
Created September 2, 2016 01:08
Show Gist options
  • Save r39132/2e6e8353d42852cdb8f7717a3b1998b9 to your computer and use it in GitHub Desktop.
Save r39132/2e6e8353d42852cdb8f7717a3b1998b9 to your computer and use it in GitHub Desktop.
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment