← Back to Pull requests

[18.0][IMP] queue_job_cron: Behave like native cron #1028

Open
unknown opened this pull request with 137 lines diff across 1 files
View on GitHub
unknown unknown commented on Nov 03, 2026 11:25 UTC
Author

Based on https://github.com/OCA/queue/pull/959

A cron run as a queue job behaves differently from a cron run by the Odoo cron worker in two ways:

Never run the same cron twice in parallel

Unlike the native cron worker, which holds the cron row lock for the whole run, a cron run as a queue job is only locked while it is enqueued, and no_parallel_queue_job_run only skips a job when an identical one is pending. A run lasting longer than the cron interval, or a trigger committed mid-run with allow_commit, started a second job of the same cron in parallel.

The job now holds the cron row lock while it runs. A concurrent job of the same cron gets LockNotAvailable, which queue_job turns into a postponed retry.

Support the cron progress API

_notify_progress is a no-op without the progress record the native cron runner puts in context, so a batched cron run as a queue job processed a single batch per run and could not deactivate itself.

The server action now runs with a progress record: the cron is triggered again while records remain, and deactivated when it asks so.

Diff: 137 lines (+102 / -35) across 1 files Reviewer: sbidoul Review duration: 20378m
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.32) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.32 · 137 lines diff across 1 files
0.32
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
46%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth shallow_review_depth
0.344
Diff Size diff_size
0.295
Real PR Conversation Timeline
1 comments
"Review active on #1028"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 46.7% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 32.5% (LOW) · Higher = larger blast radius
32.5%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 46.7% · Lower = rushed or shallow review
46.7%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 17.3% · Safe to merge
17.3%
Repository