REFACTOR Make queue_job dependencies optional#2105
Conversation
ecino
commented
Jun 25, 2026
- NEW module queue_job_sh_safe that will safely use queue_jobs when available and fallback to an alternate mechanism with ir_cron in case the module is not installed.
- This is useful for Nordic using odoo.sh on which queue jobs are prohibited and not optimal for the infrastructure
Confidence Score: 3/5The fallback queue path still needs attention around replacement jobs that receive follow-up work while already running.
queue_job_optional/models/queue_job_replacement.py
What T-Rex did
Reviews (15): Last reviewed commit: "REFACTOR Make queue_job dependencies opt..." | Re-trigger Greptile |
07f6d5f to
a0cad46
Compare
a0cad46 to
e2d8348
Compare
e2d8348 to
51f4a7d
Compare
51f4a7d to
bda7e87
Compare
bda7e87 to
c7688c2
Compare
c7688c2 to
5959cc9
Compare
5959cc9 to
9b2f73a
Compare
9b2f73a to
28c5143
Compare
f21d9e3 to
b886b0a
Compare
b886b0a to
ff7a2b5
Compare
ff7a2b5 to
1f482b5
Compare
1f482b5 to
fff7252
Compare
fff7252 to
e577373
Compare
- NEW module queue_job_sh_safe that will safely use queue_jobs when available and fallback to an alternate mechanism with ir_cron in case the module is not installed. - This is useful for Nordic using odoo.sh on which queue jobs are prohibited and not optimal for the infrastructure
e577373 to
07cdaba
Compare
| pending_job = self.search( | ||
| [ | ||
| ("identity_key", "=", identity_key), | ||
| ("state", "in", ["pending", "processing"]), |
There was a problem hiding this comment.
Processing Jobs Swallow Follow-Ups
When a second job with the same identity_key is queued while the first one is already processing, this branch merges the new res_ids into the row that cron is currently executing and returns it instead of creating pending work. The running cron already browsed the old ids and then marks the row done, so the newly merged ids are never executed for stable-key callers such as communication automation.