Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

airflow - How to force fail a dag after x number of time?

I want to force fail a dag after say 3 hours have passed. I have a dag that is scheduled for 2am and one that is scheduled for 6am. I want the 2am dag to stop and give precedence to the one scheduled at 6am.

  1. I have already tried using execution_timeout
  2. I have tried using dagrun_timeout keeps running as there are no other dags to run within the first dag.

NOTE: This is like a cross-dag dependency where I want to give preference to a dag during certain hours

question from:https://stackoverflow.com/questions/65834541/how-to-force-fail-a-dag-after-x-number-of-time

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Programmatically stopping a dag like I wanted to do above is not possible. I solved my issue, giving priority to a dag by assigning a larger pool to it.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...