anishgirianish commented on code in PR #62343:
URL: https://github.com/apache/airflow/pull/62343#discussion_r3177842203
##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -3189,6 +3208,88 @@ def _activate_assets_generate_warnings() ->
Iterator[tuple[str, str]]:
session.add(warning)
existing_warned_dag_ids.add(warning.dag_id)
+ def _enqueue_connection_tests(self, *, session: Session) -> None:
+ """Enqueue pending connection tests to executors that support them."""
+ max_concurrency = conf.getint("scheduler",
"max_connection_test_concurrency", fallback=4)
+ timeout = conf.getint("scheduler", "connection_test_timeout",
fallback=60)
+
+ num_occupied_slots = sum(executor.slots_occupied for executor in
self.executors)
+ parallelism_budget = conf.getint("core", "parallelism") -
num_occupied_slots
+ if parallelism_budget <= 0:
+ return
+
+ active_count = session.scalar(
Review Comment:
Took your option-3 path: documented N * max_concurrency per-tick ceiling in
the docstring, kept max_concurrency as per-scheduler. Sentinel-row breadcrumb
in the docstring if you'd prefer the global cap later. thank you
--
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]