<% if params[:id] && (current_worker = Resque::Worker.find(params[:id])) && (data = current_worker.job) %>

<%= current_worker %>'s job

<% host, pid, _ = current_worker.to_s.split(':') %> <% queue = data['queue'] %> <% payload = data.key?('payload') ? data['payload'] : {} %>
  Where Queue Started Class Args
working"><%= host %>:<%= pid %>"><%= queue %> <%= data['run_at'] %> <%= payload.key?('class') ? payload['class'] : "—" %> <%=h payload.key?('args') ? payload['args'].inspect : "—" %>
<% else %> <% workers = resque.working jobs = workers.collect {|w| w.job } worker_jobs = workers.zip(jobs) worker_jobs = worker_jobs.reject { |w, j| w.idle? } %>

<%= worker_jobs.size %> of <%= resque.workers.size %> Workers Working

The list below contains all workers which are currently running a job.

<% if worker_jobs.empty? %> <% end %> <% worker_jobs.sort_by { |_w, j| j['run_at'] ? j['run_at'].to_s() : '' }.each do |worker, job| %> <% host, pid, _queues = worker.to_s.split(':') %> <% end %>
  Where Queue Processing
Nothing is happening right now...
<%= state %>"><%= host %>:<%= pid %> "><%= job['queue'] %> <% if job['queue'] %> <%= partial :processing, :worker => worker, :job => job %> <% else %> Waiting for a job... <% end %>
<% end %>