Ricochet-Exchange / ricochet-keeper

Keeper for Ricochet Protocol, implemented with Apache Airflow
5 stars 10 forks source link

Use Variables to set Schedules #3

Closed mikeghen closed 2 years ago

mikeghen commented 2 years ago

This task involves converting the schedules for each DAG to use a Variable. Create variables like:

distribution-schedule-interval -> "0 * * * *"
harvest-schedule-interval -> "0 0 * * *"

Then in the DAGs:


schedule_interval = Variables.get("distribution-schedule-interval", "0 * * * *")

 dag = DAG("ricochet_stream_watch",
          max_active_runs=1,
          catchup=False,
          default_args=default_args,
          schedule_interval=schedule_interval)
mikeghen commented 2 years ago

Nice work @shreyaspapi