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


##########
airflow/jobs/scheduler_job_runner.py:
##########
@@ -492,16 +493,32 @@ def _executable_task_instances_to_queued(self, max_tis: 
int, session: Session) -
 
                 current_active_tasks_per_dag = 
concurrency_map.dag_active_tasks_map[dag_id]
                 max_active_tasks_per_dag_limit = 
task_instance.dag_model.max_active_tasks
+
+                msg_description_0 = "DAG %s has %s/%s running and queued tasks"
+                msg_description_1 = (
+                    "Not executing %s since the number of tasks running or 
queued from DAG "
+                    "%s is >= to the DAG's max_active_tasks limit of %s"
+                )

Review Comment:
   In general, you shouldn’t use a variable for a log message template string. 
It’s better to just use if-else on the log calls directly.
   
   ```python
   if max_active_tasks_include_deferred:
       log.info("message a")
   else:
       log.info("message b")
   ```



-- 
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