Skip to content

Commit

Permalink
start
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronClaydon committed Dec 19, 2024
1 parent 4b9f676 commit 0d38668
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion airflow/dags/batch-data-import.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from kubernetes.client import models as k8s
from airflow import DAG
from airflow.operators.dummy import DummyOperator
from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import KubernetesPodOperator
from airflow.utils.dates import days_ago
from airflow.hooks.base_hook import BaseHook
Expand Down Expand Up @@ -137,6 +138,9 @@ def generate_job(name : str, command : str, instance_size : str = "small", taskg
max_active_runs=1,
concurrency=2,
) as dag:
start = DummyOperator(task_id="start")
end = DummyOperator(task_id="end")

stop_linker = generate_job("stop-linker", [ "data-linker", "run", "--type", "stopsDDDDD" ])
stop_indexer = generate_job("stop-indexer", [ "indexer", "stopsDDDDD" ])

Expand Down Expand Up @@ -173,4 +177,4 @@ def generate_job(name : str, command : str, instance_size : str = "small", taskg
except yaml.YAMLError as exc:
print(exc)

taskgroups["small"] >> taskgroups["medium"] >> taskgroups["large"] >> stop_linker >> stop_indexer
start >> taskgroups["small"] >> taskgroups["medium"] >> taskgroups["large"] >> stop_linker >> stop_indexer >> end

0 comments on commit 0d38668

Please sign in to comment.