feat(rq): configurable HTTP source fetch retries - #650
Open
dan-m62 wants to merge 2 commits into
Open
Conversation
Expose DOCLING_SERVE_ENG_RQ_MAX_TASK_RETRIES (default 3) and DOCLING_SERVE_ENG_RQ_RETRY_DELAY (default 5.0) and wire them into RQOrchestratorConfig in both the orchestrator factory (API) and the rq-worker command, so the RQ engine retries transient HTTP source fetch failures (429/502/503/504, connection/timeout). Documented in configuration.md. Requires the corresponding docling-jobkit change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Daniel Imber <dimber@m62.ai>
Contributor
|
✅ DCO Check Passed Thanks @dan-m62, all your commits are properly signed off. 🎉 |
Contributor
Merge Protections🟢 Merge protection satisfied — ready to merge. Show 1 satisfied protection🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
The cu128/cu130 container-image jobs failed on a transient GitHub runner 'No space left on device' error, unrelated to this change (code checks, tests, and the cpu/default images all passed; the same builds pass on main and on docling-project#651). Empty commit to trigger a fresh CI run. Signed-off-by: Daniel Imber <dimber@m62.ai>
dan-m62
force-pushed
the
feat/rq-http-source-retry
branch
from
July 13, 2026 12:25
d69282c to
0531585
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This exposes two new settings for the RQ engine so operators can control how HTTP source fetches are retried, and wires them into
RQOrchestratorConfig. It is the docling-serve half of the retry work; the behaviour itself lives in docling-project/docling-jobkit#200, and both follow up on #648.The new settings mirror the existing
eng_ray_*retry knobs, so the two engines are configured the same way.What this changes
Two new settings (defaults chosen to match the Ray engine):
DOCLING_SERVE_ENG_RQ_MAX_TASK_RETRIES3429,502,503,504, or a connection/timeout failure). Permanent failures (401/403/404/413/415/422, oversize) are never retried. Set to0to disable retrying.DOCLING_SERVE_ENG_RQ_RETRY_DELAY5.0They are wired into
RQOrchestratorConfigat both construction sites — the API'sorchestrator_factory.pyand therq-workercommand in__main__.py. Both are needed: the fetch (and therefore the retry) happens in the worker process, so the worker's config is the one that actually governs retry behaviour.Files
docling_serve/settings.py—eng_rq_max_task_retries,eng_rq_retry_delay.docling_serve/orchestrator_factory.py— pass them intoRQOrchestratorConfig(API).docling_serve/__main__.py— pass them intoRQOrchestratorConfig(rq-worker).docs/configuration.md— document the two variables.Consistency with the Ray engine
The names (
max_task_retries/retry_delay), defaults (3/5.0) and settings style match the existingeng_ray_max_task_retries/eng_ray_retry_delay, so operators configure both engines the same way.Compatibility
RQOrchestratorConfigignores unknown keyword arguments, so this change is safe to merge against the current released docling-jobkit — the new arguments are simply dropped until the jobkit change (docling-project/docling-jobkit#) is released, at which point the retries take effect. Merging jobkit first is recommended so the settings are functional on release.Testing
Validated end-to-end by running the API and an
rq-workerfrom this branch (with the docling-jobkit branch installed) against a live Redis. Setting the variables and submitting a task whose HTTP source returns503produced the configured behaviour in the worker log:(With the defaults left in place the worker retries
3times with a5.0s delay, as expected.)Related
successfor unfetchable HTTP sources (no error surfaced, no retry) #648