Repository navigation
Conversation
dhongu
force-pushed
the
19.0-fix-cron-jobrunner-retryable
branch
2 times, most recently
from
October 29, 2026 09:25
4398e68 to
103e1e0
Compare
The cron runner always postponed a job raising RetryableJobError by 5 seconds, ignoring err.seconds and the retry pattern of the job function. Follow queue_job's controller: use err.seconds, then the retry pattern; keep 5 seconds when neither is set. Assisted-by: Claude Opus 5.5
dhongu
force-pushed
the
19.0-fix-cron-jobrunner-retryable
branch
from
October 29, 2026 09:58
103e1e0 to
3572e10
Compare
Contributor
Author
|
@ivantodorovich (addon maintainer), @espo-tony, @yelizariev — since you approved / tested #876: this PR carries the same Could you have a look and, if it's fine for you, approve? A merge by a maintainer would then unblock the addon on 19.0. Thanks! Assisted-by: Claude Opus 5.5 |
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.
This PR has two commits:
5a036336[MIG] queue_job_cron_jobrunner: Migration to 19.0 — the same change as [19.0][MIG] queue_job_cron_jobrunner: migrate #876 (manifest + not-installable exclude list + regenerated README), taken from my earlier [19.0][MIG] queue_job_cron_jobrunner: Migration to 19.0 #979, which was byte-identical to [19.0][MIG] queue_job_cron_jobrunner: migrate #876. [19.0][MIG] queue_job_cron_jobrunner: migrate #876 cannot pass the CLA check as its commit author has not signed the CLA, so this PR carries the migration with a CLA-signed commit, rebased on current 19.0;3572e102[FIX] queue_job_cron_jobrunner: honour RetryableJobError seconds — the actual fix described below.If #876 gets merged first, I will rebase and drop the migration commit.
Problem
When a job raises
RetryableJobError, the cron runner ofqueue_job_cron_jobrunneralways postpones it by a hardcoded 5 seconds. It ignores bothRetryableJobError(seconds=N)and theretry_patternof the job function, while the standard job runner (queue_jobcontroller,_try_perform_job) honours them. A job that asks to be retried in, say, 10 minutes (rate-limited API, lock held elsewhere) is retried every 5 seconds instead, burning itsmax_retriesin under a minute.Fix
Mirror the controller's behaviour:
RetryableJobError(seconds=N)→ postpone byNseconds;seconds→seconds=None, soJob.postponeapplies the job function's retry pattern;Tests
Three new tests in
tests/test_queue_job.py(explicit seconds, retry pattern, default). Without the fix, the first two fail; with it, all module tests pass on 19.0.A towncrier fragment is included (
readme/newsfragments/); no version bump, left to the bot.Assisted-by: Claude Opus 5.5