Exception: MultiBackgroundJob::NotDefinedWorker
- Defined in:
- lib/multi_background_job/errors.rb
Instance Method Summary collapse
-
#initialize(worker_class) ⇒ NotDefinedWorker
constructor
A new instance of NotDefinedWorker.
- #message ⇒ Object
Constructor Details
#initialize(worker_class) ⇒ NotDefinedWorker
Returns a new instance of NotDefinedWorker.
11 12 13 |
# File 'lib/multi_background_job/errors.rb', line 11 def initialize(worker_class) @worker_class = worker_class end |
Instance Method Details
#message ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/multi_background_job/errors.rb', line 15 def format( "The %<worker>p is not defined and the MultiBackgroundJob is configured to work on strict mode.\n" + "it's highly recommended to include this worker class to the list of known workers.\n" + "Example: `MultiBackgroundJob.configure { |config| config.workers = { %<worker>p => {} } }`\n" + 'Another option is to set config.strict = false', worker: @worker_class, ) end |