Class: ResqueWeb::StatsController

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

Instance Method Summary collapse

Methods inherited from ApplicationController

#set_subtabs, subtabs

Instance Method Details

#indexObject



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

def index
  redirect_to action: "resque"
end

#keysObject



23
24
25
26
27
28
29
30
31
32
33
34
# File 'app/controllers/resque_web/stats_controller.rb', line 23

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

#redisObject



16
17
18
19
20
21
# File 'app/controllers/resque_web/stats_controller.rb', line 16

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

#resqueObject



9
10
11
12
13
14
# File 'app/controllers/resque_web/stats_controller.rb', line 9

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