You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/11/03 16:54:26 UTC

[GitHub] [airflow] ephraimbuddy commented on a change in pull request #19367: Use `dag.max_active_runs` instead of `dag_model.max_active_runs`

ephraimbuddy commented on a change in pull request #19367:
URL: https://github.com/apache/airflow/pull/19367#discussion_r742146452



##########
File path: airflow/models/dag.py
##########
@@ -2743,7 +2743,9 @@ def __init__(self, concurrency=None, **kwargs):
             else:
                 self.max_active_tasks = conf.getint('core', 'max_active_tasks_per_dag')
         if self.max_active_runs is None:
-            self.max_active_runs = conf.getint('core', 'max_active_runs_per_dag')
+            self.max_active_runs = kwargs.get(
+                'max_active_runs', conf.getint('core', 'max_active_runs_per_dag', fallback=16)
+            )

Review comment:
       I just added it to be safe in case max_active_runs_per_dag is removed from the configuration. 
   Can't think of any other reason why they'd get that errror




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org