Sha256: fee048a0b0183b780b77003225b544c55f1f8f503151067f3b37b8d1ae72ffd5

Contents?: true

Size: 467 Bytes

Versions: 7

Compression:

Stored size: 467 Bytes

Contents

module ResqueWeb
  class WorkersController < ResqueWeb::ApplicationController
    before_action :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

7 entries across 7 versions & 2 rubygems

Version Path
resque-web-0.0.12 app/controllers/resque_web/workers_controller.rb
resque-web-0.0.11 app/controllers/resque_web/workers_controller.rb
resque-web-0.0.10 app/controllers/resque_web/workers_controller.rb
misha-resque-web-0.1.1 app/controllers/resque_web/workers_controller.rb
misha-resque-web-0.1.0 app/controllers/resque_web/workers_controller.rb
misha-resque-web-0.0.9 app/controllers/resque_web/workers_controller.rb
resque-web-0.0.9 app/controllers/resque_web/workers_controller.rb