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


##########
airflow/jobs/scheduler_job_runner.py:
##########
@@ -717,11 +717,15 @@ def _critical_section_enqueue_task_instances(self, 
session: Session) -> int:
         # across all executors.
         num_occupied_slots = sum([executor.slots_occupied for executor in 
self.job.executors])
         parallelism = conf.getint("core", "parallelism")
+        # Parallelism configured to 0 means infinite currently running tasks
+        if parallelism == 0:
+            parallelism = sys.maxsize

Review Comment:
   Is it a good idea if we use `math.inf` here instead? (That’d be a float 
though)
   
   I also wonder if we should just have a special value in the config that 
converts to infinity instead of 0.



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