Sha256: 647ce579557afa90da87728713b830921a6fef080cb86e51905041c837164d96

Contents?: true

Size: 456 Bytes

Versions: 2

Compression:

Stored size: 456 Bytes

Contents

module ResqueWeb
  class WorkersController < ApplicationController
    before_filter :display_subtabs

    def index
    end

    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

    private

    def display_subtabs
      set_subtabs view_context.worker_hosts.map(&:first)
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
resque-web-0.0.6 app/controllers/resque_web/workers_controller.rb
resque-web-0.0.5 app/controllers/resque_web/workers_controller.rb