Skip to content

Commit

Permalink
Merge pull request #51 from acsone/8.0-job-done-in-same-tx-sbi
Browse files Browse the repository at this point in the history
[FIX] connector worker: jobs must be set done in same transaction as job execution
  • Loading branch information
yvaucher committed May 13, 2015
2 parents 70bd9c3 + 179792f commit f22fc40
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions connector/queue/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,9 @@ def retry_postpone(job, message, seconds=None):
_logger.debug('%s started', job)
with session_hdl.session() as session:
job.perform(session)
_logger.debug('%s done', job)

with session_hdl.session() as session:
job.set_done()
self.job_storage_class(session).store(job)
_logger.debug('%s done', job)

except NothingToDoJob as err:
if unicode(err):
Expand Down

0 comments on commit f22fc40

Please sign in to comment.