uranusjr commented on code in PR #29094:
URL: https://github.com/apache/airflow/pull/29094#discussion_r1166300450


##########
airflow/models/dag.py:
##########
@@ -2789,7 +2789,9 @@ def bulk_write_to_db(
             orm_dag.description = dag.description
             orm_dag.max_active_tasks = dag.max_active_tasks
             orm_dag.max_active_runs = dag.max_active_runs
-            orm_dag.has_task_concurrency_limits = any(t.max_active_tis_per_dag 
is not None for t in dag.tasks)
+            orm_dag.has_task_concurrency_limits = any(
+                t.max_active_tis_per_dag is not None or 
t.max_active_tis_per_dagrun for t in dag.tasks

Review Comment:
   Does 0 have special meaning here? I feel this should be `is not None` to 
match existing style.



##########
airflow/jobs/backfill_job_runner.py:
##########
@@ -631,6 +631,20 @@ def _per_task_process(key, ti: TaskInstance, session):
                                     "Not scheduling since Task concurrency 
limit is reached."
                                 )
 
+                        if task.max_active_tis_per_dagrun:

Review Comment:
   Same for checks against this, I feel `is not None` is more logical? 
(Although the difference is really minimal in practice.)



-- 
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-unsubscr...@airflow.apache.org

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

Reply via email to