Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Airflow unpause per-dag in definition

Is there any way to leave the server default..

dags_are_paused_at_creation = True

... but for one particular dag define it as unpaused by default ?

dag = DAG(
    dag_id=MISC_DAG_ID,
    default_args=default_args,
    params=params,
    schedule_interval=None,
    concurrency=1,
    max_active_runs=1,
    is_paused=False
)
like image 790
Exie Avatar asked Nov 26 '22 02:11

Exie


1 Answers

from the documentation

is_paused_upon_creation (bool or None) – Specifies if the dag is paused when created for the first time. If the dag exists already, this flag will be ignored. If this optional parameter is not specified, the global config setting will be used.

so set is_paused_upon_creation=False

like image 147
Bernardo stearns reisen Avatar answered Nov 28 '22 15:11

Bernardo stearns reisen