Class: ResqueWeb::WorkersController

Inherits:
ApplicationController show all
Defined in:
app/controllers/resque_web/workers_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#set_subtabs, subtabs

Instance Method Details

#destroyObject

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

#indexObject



5
6
# File 'app/controllers/resque_web/workers_controller.rb', line 5

def index
end

#showObject



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