Skip to content

Commit a196a87

Browse files
committed
Call admint_project_builds to dispatch immediately if possible
1 parent 1184fe8 commit a196a87

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

readthedocs/core/utils/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,11 @@ def trigger_build(project, version=None, commit=None, from_webhook=False):
246246

247247
# Feature-flag dispatch: isolated-builders path vs legacy Celery path.
248248
if project.has_feature(Feature.USE_ISOLATED_BUILDER):
249-
# The build stays in ``triggered``; the periodic ``admit_queued_builds``
250-
# task enforces concurrency and dispatches it to the isolated-builders
251-
# fleet when a slot is free. See :func:`admit_project_builds`.
249+
# The build stays in ``triggered``; we call `admit_project_builds` to dispatch immediately
250+
# if there is a slot free. Otherwise, it waits for a later pass of the periodic ``admit_queued_builds``
251+
# task that enforces concurrency and dispatches it to the isolated-builders
252+
# fleet when a slot is free.
253+
admit_project_builds(project)
252254
return None, build
253255

254256
task = update_docs_task.apply_async()

0 commit comments

Comments
 (0)