Skip to content

Commit fa7d22a

Browse files
committed
Merge PR #944 into 12.0
Signed-off-by guewen
2 parents 7ef9afd + 3042c60 commit fa7d22a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

queue_job/controllers/main.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ def retry_postpone(job, message, seconds=None):
148148
# traceback in the logs we should have the traceback when all
149149
# retries are exhausted
150150
env.cr.rollback()
151+
# A postponed job is not done: it must not release its dependent
152+
# jobs. Returning here also avoids calling _enqueue_dependent_jobs
153+
# with job.env pointing to the now-closed cursor that
154+
# retry_postpone() opened and closed, which would raise
155+
# "Unable to use a closed cursor".
156+
return ""
151157

152158
except (FailedJobError, Exception) as orig_exception:
153159
buff = StringIO()

0 commit comments

Comments
 (0)