ephraimbuddy commented on issue #13407: URL: https://github.com/apache/airflow/issues/13407#issuecomment-908424100
Actually, the problem with `max_active_runs` is that the line of code below: https://github.com/apache/airflow/blob/24aa34b12d1f20b6d59b76a3787bb633f7a86fd7/airflow/jobs/scheduler_job.py#L973 doesn't get distinct dag_ids. For example: dag1 has 8queued dagruns and dag2 has 5 queued dagruns and dag3 has 6 The code would get all the 8 dagruns from dag1(if it has the closest date) and then 2 dagruns from dag2 and nothing from dag3. The correct thing should be for each dag, get all queued dagruns and set the state to running if the `max_active_runs` is not reached -- 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]
