Description
add a global /suspend and /resume endpoint to the REST API (and corresponding CLI command) that would do the following for the entire airflow deployment:
/suspend
- pause all currently unpaused DAGs (keeping track of what was previously unpaused in the metadata db)
- Set
AIRFLOW__SCHEDULER__USE_JOB_SCHEDULE=False (if not already false) to prevent scheduler from scheduling more tasks
- (should handle duplicate suspend calls by
409: Airflow is already suspended)
/resume
- unpause all DAGs from a previous
/suspend call
- set
AIRFLOW__SCHEDULER__USE_JOB_SCHEDULE to whatever it was before the last /suspend call
- (should handle resuming an airflow that is not in the suspended state with
409: Cannot resume an airflow that is not in suspended state)
Use case/motivation
This could be really helpful for people wanting to pause everything:
- before running and upgrade to a newer airflow version
- because this is a dev enviornment and we don't need anything to run outside of working hours to reduce resource consumption
- "archiving an airflow" call suspend then tear down all the airflow components, could be restored by bringing up the components and then calling resume.
Related issues
No response
Are you willing to submit a PR?
Code of Conduct
Description
add a global
/suspendand/resumeendpoint to the REST API (and corresponding CLI command) that would do the following for the entire airflow deployment:/suspendAIRFLOW__SCHEDULER__USE_JOB_SCHEDULE=False(if not already false) to prevent scheduler from scheduling more tasks409: Airflow is already suspended)/resume/suspendcallAIRFLOW__SCHEDULER__USE_JOB_SCHEDULEto whatever it was before the last/suspendcall409: Cannot resume an airflow that is not in suspended state)Use case/motivation
This could be really helpful for people wanting to pause everything:
Related issues
No response
Are you willing to submit a PR?
Code of Conduct