You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any hope to see some adaptation for shoryuken ? Or even better, for ActiveJob ? (and if it's supposed to be working already, I can fill out a better bug report)
The text was updated successfully, but these errors were encountered:
If you don't care for perfection, one way to go is to add the following to your ApplicationJob:
# app/jobs/application_job.rbclassApplicationJob < ActiveJob::Base# Automatically retry jobs that encountered a deadlock# retry_on ActiveRecord::Deadlocked# Most jobs are safe to ignore if the underlying records are no longer available# discard_on ActiveJob::DeserializationErrorrescue_fromStandardErrordo |exception|
ExceptionNotifier.notify_exception(exception)endend
Note: Since rescue_from stops with the first handler which handles an exception there is no way to continue with other rescue_from handlers. You could go another path with around_perform, but then all helper methods such as retry_on and discard_on will not prevent exceptions from being sent.
To decorate the failure a bit more (by giving the name of the failed job for instance) you can also do:
Any hope to see some adaptation for shoryuken ? Or even better, for ActiveJob ? (and if it's supposed to be working already, I can fill out a better bug report)
The text was updated successfully, but these errors were encountered: