Skip to content

Commit

Permalink
i don't know how to write dags
Browse files Browse the repository at this point in the history
  • Loading branch information
jpl-btlunsfo committed May 10, 2024
1 parent fe37dc3 commit 9b7973e
Showing 1 changed file with 17 additions and 21 deletions.
38 changes: 17 additions & 21 deletions airflow/dags/env_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,25 @@
"start_date": datetime.utcfromtimestamp(0),
}


dump_env = BashOperator(
task_id="env",
bash_command="env",
)

check_vars = BashOperator(
task_id="check",
bash_command="echo {} {} {} {} {}".format(
Variable.get("unity_project"),
Variable.get("unity_venue"),
Variable.get("unity_deployment_name"),
Variable.get("unity_counter"),
Variable.get("unity_cluster_name")),
)


dag = DAG(
with DAG(
dag_id="env_test",
default_args=default_args,
schedule=None,
is_paused_upon_creation=False,
tags=["test"],
)

dump_env > check_vars
) as dag:
dump_env = BashOperator(
task_id="env",
bash_command="env",
)

check_vars = BashOperator(
task_id="check",
bash_command="echo {} {} {} {} {}".format(
Variable.get("unity_project"),
Variable.get("unity_venue"),
Variable.get("unity_deployment_name"),
Variable.get("unity_counter"),
Variable.get("unity_cluster_name")),
)
dump_env >> check_vars

0 comments on commit 9b7973e

Please sign in to comment.