Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
aliavni committed Jun 18, 2024
1 parent 89028f2 commit df5cf48
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions airflow/dags/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ def get_dag_configs() -> list[DagConfig]:
"""Read all dag config json files and return a list of `DagConfig`s"""
dag_configs = []
for file_path in glob.glob("dags/dag_configs/*.json"):
f = open(file_path, "r")
dag_config_json = json.load(f)
dag_config = DagConfig(**dag_config_json)
dag_configs.append(dag_config)
with open(file_path, "r") as f:
dag_config_json = json.load(f)
dag_config = DagConfig(**dag_config_json)
dag_configs.append(dag_config)

return dag_configs

Expand All @@ -47,7 +47,7 @@ def add_tasks_to_dag(dag: DAG, dag_config: DagConfig) -> None:
task = EmptyOperator(task_id=task_id, dag=dag)

if previous_task is not None:
task.set_upstream(previous_task)
previous_task.set_downstream(task)

previous_task = task

Expand Down

0 comments on commit df5cf48

Please sign in to comment.