Nataneljpwd commented on code in PR #64109:
URL: https://github.com/apache/airflow/pull/64109#discussion_r2981444910
##########
airflow-core/src/airflow/models/dagrun.py:
##########
@@ -690,8 +708,13 @@ def get_queued_dag_runs_to_set_running(cls, session:
Session) -> ScalarResult[Da
# the one done in this query verifies that the dag is not
maxed out
# it could return many more dag runs than runnable if there is
even
# capacity for 1. this could be improved.
- coalesce(running_drs.c.num_running, text("0"))
- < coalesce(Backfill.max_active_runs, DagModel.max_active_runs),
+ available_dagruns_rn.c.rn
+ <= coalesce(
+ Backfill.max_active_runs,
+ DagModel.max_active_runs,
+ airflow_conf.getint("core", "max_active_runs_per_dag"),
+ )
Review Comment:
Oh, according to the Dagmodel, it is a nullable field, and I saw the
configuration checked in the scheduler itself, maybe I missed something, it did
work without this as well, so I will remove it
--
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]