Sha256: a3c2404306363bac4544c17d35bb4eda1953085c244f1d2c669fb68f2921629f

Contents?: true

Size: 725 Bytes

Versions: 7

Compression:

Stored size: 725 Bytes

Contents

module ResqueWeb
  class StatsController < ResqueWeb::ApplicationController
    subtabs :resque, :redis, :keys

    def index
      redirect_to action: "resque"
    end

    def resque
      respond_to do |format|
        format.html
        format.json { render json: Hash[Resque.info.sort] }
      end
    end

    def redis
      respond_to do |format|
        format.html
        format.json { render json: Hash[Resque.redis.info.sort] }
      end
    end

    def keys
      respond_to do |format|
        format.html do
          if params[:id]
            render 'key'
          else
            render 'keys'
          end
        end
        format.json { render json: Resque.keys.sort }
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
misha-resque-web-0.1.1 app/controllers/resque_web/stats_controller.rb
misha-resque-web-0.1.0 app/controllers/resque_web/stats_controller.rb
misha-resque-web-0.0.9 app/controllers/resque_web/stats_controller.rb
resque-web-0.0.9 app/controllers/resque_web/stats_controller.rb
resque-web-0.0.8 app/controllers/resque_web/stats_controller.rb
resque-web-edge-1.0.0 app/controllers/resque_web/stats_controller.rb
resque-web-0.0.7 app/controllers/resque_web/stats_controller.rb