Commit 6754120 1 parent e4e8445 commit 6754120 Copy full SHA for 6754120
File tree 1 file changed +34
-1
lines changed
1 file changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -77,12 +77,45 @@ with DAG(
77
77
78
78
## Example DAG: [ ` airflow-config ` ] ( https://github.com/airflow-laminar/airflow-config )
79
79
80
- ``` yaml
81
80
81
+ ``` yaml
82
+ # @package _global_
83
+ _target_ : airflow_config.Configuration
84
+ default_args :
85
+ _target_ : airflow_config.DefaultArgs
86
+ retries : 0
87
+ depends_on_past : false
88
+ all_dags :
89
+ _target_ : airflow_config.DagArgs
90
+ start_date : " 2024-01-01"
91
+ catchup : false
92
+ extensions :
93
+ supervisor :
94
+ _target_ : airflow_supervisor.SupervisorAirflowConfiguration
95
+ airflow :
96
+ _target_ : airflow_supervisor.AirflowConfiguration
97
+ port : " *:9091"
98
+ working_dir : " /data/airflow/supervisor"
99
+ config_path : " /data/airflow/supervisor/supervisor.conf"
100
+ program :
101
+ test :
102
+ _target_ : airflow_supervisor.ProgramConfiguration
103
+ command : " bash -c 'sleep 14400; exit 1'"
82
104
` ` `
83
105
84
106
` ` ` python
107
+ from datetime import timedelta
108
+ from airflow_config import load_config, DAG
109
+ from airflow_supervisor import Supervisor
85
110
111
+ config = load_config(config_name="airflow")
112
+
113
+ with DAG(
114
+ dag_id="test-supervisor",
115
+ schedule=timedelta(days=1),
116
+ config=config,
117
+ ) as dag :
118
+ supervisor = Supervisor(dag=dag, cfg=config.extensions["supervisor"])
86
119
` ` `
87
120
88
121
## How To: Use as a supervisord configuration frontend
You can’t perform that action at this time.
0 commit comments