Skip to content

Commit

Permalink
fix(sat-dag): Use latestonly operator
Browse files Browse the repository at this point in the history
  • Loading branch information
devsjc committed Mar 4, 2025
1 parent 1230a50 commit 596449f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/airflow_dags/dags/uk/sat-dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

from airflow.decorators import dag
from airflow.operators.bash import BashOperator
from airflow.operators.latest_only import LatestOnlyOperator
from airflow.utils.trigger_rule import TriggerRule

from airflow_dags.plugins.callbacks.slack import slack_message_callback
Expand Down Expand Up @@ -69,6 +70,8 @@ def update_operator(cadence_mins: int) -> BashOperator:
)
def sat_consumer_dag() -> None:
"""Dag to download and process satellite data from EUMETSAT."""
latest_op = LatestOnlyOperator(task_id="determine_latest_run")

setup_op = sat_consumer.setup_operator()

consume_rss_op = sat_consumer.run_task_operator(
Expand Down Expand Up @@ -97,7 +100,7 @@ def sat_consumer_dag() -> None:

teardown_op = sat_consumer.teardown_operator()

setup_op >> consume_rss_op >> consume_odegree_op >> teardown_op
latest_op >> setup_op >> consume_rss_op >> consume_odegree_op >> teardown_op

sat_consumer_dag()

0 comments on commit 596449f

Please sign in to comment.