-
-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore ActiveJob::DeserializationError when discarding jobs (#771)
Previously, discarding a job would attempt to deserialize the job arguments and crash. We load the job to attempt to run the `#instrument` method, but unfortunately this means that the job could not be discarded. This commit adds a flag to `Execution#active_job`, `ignore_deserialization_errors`, which says "I want to load this job but I don't mind if the arguments cannot be deserialized". There are only two places currently where this method is called, and the other one (`retry_job`) will still throw errors when attempting to retry a job in this state. But now, when discarding, the errors are completely ignored and the job can be discarded.
- Loading branch information
1 parent
39d7e8b
commit 78dfb47
Showing
3 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters