Exception: ActiveJob::Errors::JobNotFoundError
- Inherits:
-
StandardError
- Object
- StandardError
- ActiveJob::Errors::JobNotFoundError
- Defined in:
- lib/active_job/errors/job_not_found_error.rb
Instance Attribute Summary collapse
-
#job_relation ⇒ Object
readonly
Returns the value of attribute job_relation.
Instance Method Summary collapse
-
#initialize(job_or_job_id, job_relation) ⇒ JobNotFoundError
constructor
A new instance of JobNotFoundError.
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_relation ⇒ Object (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 |