SamWheating commented on issue #11901:
URL: https://github.com/apache/airflow/issues/11901#issuecomment-882942563


   👋 Hey there, I was looking into this issue a bit today and it looks like the 
code which deactivates stale DAGs will never be reached if the value of 
`scheduler.num_runs` isn't set. 
   
   From the source code:
   
https://github.com/apache/airflow/blob/3234527284ce01db67ba22c544f71ddaf28fa27e/airflow/jobs/scheduler_job.py#L652-L664
   
   So that call to `run_scheduler_job` will only every break the loop _if_ the 
value of `scheduler.num_runs` is set (the default is -1, for an infinite loop):
   
   
https://github.com/apache/airflow/blob/2fea4cdceaa12b3ac13f24eeb383af624aacb2e7/airflow/jobs/scheduler_job.py#L756-L762
   
   Is this intended behaviour, or something that should be fixed / better 
documented?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to