Exception: ActiveJob::Uniqueness::JobNotUnique
- Defined in:
- lib/active_job/uniqueness/errors.rb
Overview
Raised on attempt to enqueue a not unique job with :raise on_conflict. Also raised when the runtime lock is taken by some other job.
class MyJob < ActiveJob::Base
unique :until_expired, on_conflict: :raise
end
MyJob.perform_later(1) MyJob.perform_later(1) # exception raised