Skip to content

REFACTOR Make queue_job dependencies optional#2105

Open
ecino wants to merge 1 commit into
18.0from
ecino/queue-job-sh
Open

REFACTOR Make queue_job dependencies optional#2105
ecino wants to merge 1 commit into
18.0from
ecino/queue-job-sh

Conversation

@ecino

@ecino ecino commented Jun 25, 2026

Copy link
Copy Markdown
Member
  • 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

gemini-code-assist[bot]

This comment was marked as resolved.

@greptile-apps

This comment was marked as resolved.

Comment thread queue_job_sh_safe/security/ir.model.access.csv Outdated
Comment thread queue_job_sh_safe/models/queue_job_replacement.py Outdated
Comment thread queue_job_sh_safe/models/base.py Outdated
Comment thread queue_job_optional/models/queue_job_replacement.py Outdated
Comment thread queue_job_sh_safe/models/base.py Outdated
@ecino ecino force-pushed the ecino/queue-job-sh branch from 07f6d5f to a0cad46 Compare June 25, 2026 18:40
Comment thread queue_job_sh_safe/security/ir.model.access.csv Outdated
Comment thread queue_job_sh_safe/models/base.py Outdated
Comment thread queue_job_optional/models/queue_job_replacement.py
Comment thread partner_communication/__manifest__.py Outdated
Comment thread message_center_compassion/__manifest__.py
@ecino ecino force-pushed the ecino/queue-job-sh branch from a0cad46 to e2d8348 Compare June 25, 2026 19:08
Comment thread queue_job_sh_safe/models/base.py Outdated
Comment thread queue_job_sh_safe/models/queue_job_replacement.py Outdated
Comment thread queue_job_sh_safe/models/queue_job_replacement.py Outdated
Comment thread partner_communication/__manifest__.py
@ecino ecino force-pushed the ecino/queue-job-sh branch from e2d8348 to 51f4a7d Compare June 29, 2026 08:32
Comment thread queue_job_sh_safe/models/queue_job_replacement.py Outdated
Comment thread queue_job_sh_safe/models/queue_job_replacement.py Outdated
Comment thread partner_communication/models/ir_actions.py
Comment thread message_center_compassion/__manifest__.py Outdated
@ecino ecino force-pushed the ecino/queue-job-sh branch from 51f4a7d to bda7e87 Compare June 29, 2026 09:19
Comment thread gift_compassion/models/account_move_line.py Outdated
Comment thread queue_job_optional/models/base.py
@ecino ecino force-pushed the ecino/queue-job-sh branch from bda7e87 to c7688c2 Compare June 29, 2026 09:41
Comment thread queue_job_optional/models/base.py
Comment thread child_compassion/models/child_compassion.py
@ecino ecino force-pushed the ecino/queue-job-sh branch from c7688c2 to 5959cc9 Compare June 29, 2026 09:54
Comment thread partner_communication_reminder/models/recurring_contract.py
Comment thread partner_communication/models/communication_job.py
Comment thread queue_job_sh_safe/models/queue_job_replacement.py Outdated
@ecino ecino force-pushed the ecino/queue-job-sh branch from 5959cc9 to 9b2f73a Compare June 29, 2026 10:15
Comment thread queue_job_sh_safe/models/base.py Outdated
@ecino ecino force-pushed the ecino/queue-job-sh branch from 9b2f73a to 28c5143 Compare June 29, 2026 11:45
Comment thread queue_job_optional/models/base.py
@ecino ecino force-pushed the ecino/queue-job-sh branch 2 times, most recently from f21d9e3 to b886b0a Compare June 29, 2026 12:31
@ecino ecino changed the title [WIP] FEAT! Make queue_job dependencies optional REFACTOR Make queue_job dependencies optional Jun 29, 2026
@ecino ecino marked this pull request as ready for review June 29, 2026 12:31
Comment thread queue_job_optional/models/base.py
Comment thread queue_job_optional/models/queue_job_replacement.py Outdated
@ecino ecino force-pushed the ecino/queue-job-sh branch from b886b0a to ff7a2b5 Compare June 29, 2026 13:24
Comment thread queue_job_optional/models/queue_job_replacement.py Outdated
@ecino ecino force-pushed the ecino/queue-job-sh branch from ff7a2b5 to 1f482b5 Compare June 29, 2026 13:35
Comment thread queue_job_optional/models/queue_job_replacement.py
@ecino ecino force-pushed the ecino/queue-job-sh branch from 1f482b5 to fff7252 Compare June 29, 2026 13:48
Comment thread queue_job_optional/models/queue_job_replacement.py
@ecino ecino force-pushed the ecino/queue-job-sh branch from fff7252 to e577373 Compare June 29, 2026 14:26
Comment thread partner_communication_reminder/models/recurring_contract.py
@ecino ecino force-pushed the ecino/queue-job-sh branch from e577373 to 07cdaba Compare June 29, 2026 14:39
Comment thread queue_job_optional/models/queue_job_replacement.py Outdated
@ecino ecino force-pushed the ecino/queue-job-sh branch from 07cdaba to de103a9 Compare July 1, 2026 09:09
Comment thread queue_job_optional/models/base.py
@ecino ecino force-pushed the ecino/queue-job-sh branch from de103a9 to f83f159 Compare July 1, 2026 09:34
Comment thread message_center_compassion/__manifest__.py
@ecino ecino force-pushed the ecino/queue-job-sh branch from f83f159 to 8572c94 Compare July 1, 2026 09:46
Comment thread partner_communication/__manifest__.py
@ecino ecino force-pushed the ecino/queue-job-sh branch from 8572c94 to 7ae0694 Compare July 1, 2026 11:09
Comment thread queue_job_optional/models/queue_job_replacement.py
Comment thread queue_job_optional/models/queue_job_replacement.py
Comment thread queue_job_optional/models/queue_job_replacement.py
- 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
@ecino ecino force-pushed the ecino/queue-job-sh branch from 7ae0694 to 16e8779 Compare July 1, 2026 13:52
job.delay()
return job
else:
return getattr(self.with_delay(**delay_args), job_function)(*job_args)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Parent Job Becomes Record

When sbc_compassion calls with_delay_sh("run_analyze", wait_for_children=True) without split or parent_job_id, this branch uses with_delay(...).run_analyze() and returns an already-created queue.job record. The next call passes that value as parent_job_id, reaches parent_job.on_done(job), and can crash instead of preserving the old delayable().run_analyze(); job.on_done(after_job).delay() ordering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant