Skip to content

Conversation

@guewen
Copy link
Member

@guewen guewen commented Feb 10, 2021

When RetryableJobError was raised, any change done by the job was not
rollbacked.

Using raise would throw the exception up to the core and rollback, but
we would have a stack trace in the logs for each try. Calling rollback
manually (rollback also clears the env) hide the tracebacks, however,
when the last try fails, the full traceback is still shown in the logs.

Fixes #261

wpichler and others added 2 commits February 10, 2021 12:36
When RetryableJobError was raised, any change done by the job was not
rollbacked.

Using `raise` would throw the exception up to the core and rollback, but
we would have a stack trace in the logs for each try. Calling rollback
manually (rollback also clears the env) hide the tracebacks, however,
when the last try fails, the full traceback is still shown in the logs.

Fixes OCA#261
When Job.date_done has been set, for instance because the job has been
performed, if the job is set back to pending (e.g. a RetryableJobError
is raised), the date_done is kept.
@guewen guewen force-pushed the Callino-12.0-fix_retryable_job-WP branch from a0e1628 to a5028fb Compare February 10, 2021 11:37
@guewen guewen changed the title [12.0][FIX] Fixed #261. Retryable Job Exception must also throw the excepti… [12.0] Fix missing rollback on retried jobs Feb 10, 2021
@guewen
Copy link
Member Author

guewen commented Mar 15, 2021

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 12.0-ocabot-merge-pr-311-by-guewen-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit db7279a into OCA:12.0 Mar 15, 2021
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 2effdf5. Thanks a lot for contributing to OCA. ❤️

@guewen guewen deleted the Callino-12.0-fix_retryable_job-WP branch March 15, 2021 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants