Module: CoreDelayedJobWorkersController
- Includes:
- CoreController
- Defined in:
- lib/app/controllers/concerns/core_delayed_job_workers_controller.rb
Overview
Manage access to delayed job workers
Instance Method Summary collapse
-
#delayed_job_worker ⇒ Object
Fetch the required job by id.
-
#destroy ⇒ Object
Destroy the selected delayed job worker.
-
#index ⇒ Object
Show a list of workers currently in the system.
Instance Method Details
#delayed_job_worker ⇒ Object
Fetch the required job by id
32 33 34 |
# File 'lib/app/controllers/concerns/core_delayed_job_workers_controller.rb', line 32 def delayed_job_worker @delayed_job_worker ||= Delayed::Jobs::Worker.find(params[:id]) end |
#destroy ⇒ Object
Destroy the selected delayed job worker
19 20 21 22 23 24 25 26 27 |
# File 'lib/app/controllers/concerns/core_delayed_job_workers_controller.rb', line 19 def destroy :manage, delayed_job_worker delayed_job_worker.destroy! flash.now[:info] = 'Delayed Job Worker has been destroyed' redirect_to index_path rescue StandardError => error log_controller_error error, true redirect_to index_path end |