Skip to content

Ignore ActiveJob::DeserializationError by default #701

@nateberkopec

Description

@nateberkopec

See #642. Activejob deserialization errors are pretty common, usually raised when we deleted the record we were going to process in a background job:

class PopulateDocsJob < ApplicationJob
  def perform(repo)
    repo.populate_docs!
  end
end

However, if you have an async config that looks like:

class SentryJob < ApplicationJob
  queue_as :default

  def perform(event)
    Raven.send_event(event)
  end
end

and repo isn't found, you'll raise ActiveJob::DeserializationError and blow up your Sidekiq instance as we run into an infinite loop.

Since ActiveJob::DeserializationError is basically a NotFound error, we should ignore it by default, just like all the other NotFound errors we ignore by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions