Exception: ActiveJob::Errors::JobNotFoundError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/active_job/errors/job_not_found_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(job_or_job_id, job_relation) ⇒ JobNotFoundError

Returns a new instance of JobNotFoundError.



6
7
8
9
10
11
# File 'lib/active_job/errors/job_not_found_error.rb', line 6

def initialize(job_or_job_id, job_relation)
  @job_relation = job_relation

  job_id = job_or_job_id.is_a?(ActiveJob::Base) ? job_or_job_id.job_id : job_or_job_id
  super("Job with id '#{job_id}' not found")
end

Instance Attribute Details

#job_relationObject (readonly)

Returns the value of attribute job_relation.



4
5
6
# File 'lib/active_job/errors/job_not_found_error.rb', line 4

def job_relation
  @job_relation
end