Class: ResqueWeb::WorkersController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- ResqueWeb::WorkersController
- Defined in:
- app/controllers/resque_web/workers_controller.rb
Instance Method Summary collapse
-
#destroy ⇒ Object
def destroy Resque::Failure.remove(params) redirect_to failures_path(redirect_params) end.
- #index ⇒ Object
- #show ⇒ Object
Methods inherited from ApplicationController
Instance Method Details
#destroy ⇒ Object
def destroy
Resque::Failure.remove(params[:id])
redirect_to failures_path(redirect_params)
end
21 22 23 24 |
# File 'app/controllers/resque_web/workers_controller.rb', line 21 def destroy Resque::Worker.find(params[:id]).unregister_worker format.html { redirect_to workers_path, notice: 'Worker successully killed.' } end |
#index ⇒ Object
5 6 |
# File 'app/controllers/resque_web/workers_controller.rb', line 5 def index end |
#show ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/controllers/resque_web/workers_controller.rb', line 8 def show if params[:id] && params[:id] != 'all' @workers = view_context.worker_hosts[params[:id]].map { |id| Resque::Worker.find(id) } else @workers = Resque.workers end end |