Skip to content

Syncing from upstream OCA/queue (12.0) - #577

Merged
bt-admin merged 4 commits into
brain-tec:12.0from
OCA:12.0
Jul 22, 2026
Merged

Syncing from upstream OCA/queue (12.0)#577
bt-admin merged 4 commits into
brain-tec:12.0from
OCA:12.0

Conversation

@bt-admin

Copy link
Copy Markdown

bt_gitbot

MiquelRForgeFlow and others added 4 commits July 21, 2026 13:40
…pone

When a job's perform() raised a PG serialization error, the runjob controller wrapped it as RetryableJobError and called retry_postpone(), which reassigns job.env to a temporary cursor inside a `with` block and closes it on exit. The handler then fell through to _enqueue_dependent_jobs() -> Job.enqueue_waiting(), running self.env.cr.execute() on that now-closed cursor and raising
"psycopg2.OperationalError: Unable to use a closed cursor".

A postponed job is not done and must not release its dependent jobs, so return right after the rollback. This also avoids touching the closed cursor. Aligns 12.0 with the upstream 14.0+ behaviour.
…or-retryable

[12.0][FIX] queue_job: don't enqueue dependent jobs after a retryable postpone (closed cursor)
@bt-admin bt-admin added the 12.0 label Jul 22, 2026
@bt-admin
bt-admin merged commit 65b61b1 into brain-tec:12.0 Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants