You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "daniel-slaugh (via GitHub)" <gi...@apache.org> on 2025/05/19 21:41:10 UTC

[D] Best Practice for Keeping External API in Sync with Airflow DAG paused State [airflow]

GitHub user daniel-slaugh created a discussion: Best Practice for Keeping External API in Sync with Airflow DAG paused State

Hi everyone,

I'm working on a data orchestration system where an external API (part of our data management platform) maintains metadata about each DAG, including a paused field. I’d like to ensure this field stays in sync with the DAG’s actual is_paused status in Airflow — regardless of whether the pause/unpause action is triggered from the Airflow UI or our REST API.

I’ve successfully implemented one side of the sync:
When users change the paused state via our API/frontend, we write a JSON config and use a DAG file sync script to update the corresponding DAG in Airflow using DagModel.set_is_paused(...).

What I still need is the reverse:
When someone pauses or unpauses a DAG from the Airflow UI, I want to detect that change and PATCH our backend API with the new state.

We're on Airflow 2.10.5 currently, but open to migrating to Airflow 3.x if there's better support.

Any insights or patterns you've seen would be deeply appreciated.
Thanks in advance!


GitHub link: https://github.com/apache/airflow/discussions/50801

----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org