Skip to content

Commit d3c4594

Browse files
committed
feat(BaseJob): Retry on dead lock and deserialization errors
These are useful defaults recommended by Rails.
1 parent cc74080 commit d3c4594

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/jobs/alchemy/base_job.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
module Alchemy
44
class BaseJob < ActiveJob::Base
55
# Automatically retry jobs that encountered a deadlock
6-
# retry_on ActiveRecord::Deadlocked
6+
retry_on ActiveRecord::Deadlocked
77

88
# Most jobs are safe to ignore if the underlying records are no longer available
9-
# discard_on ActiveJob::DeserializationError
9+
discard_on ActiveJob::DeserializationError
1010
end
1111
end

0 commit comments

Comments
 (0)