Class: Resque::Server

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/resque/server.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.tabsObject



197
198
199
# File 'lib/resque/server.rb', line 197

def self.tabs
  @tabs ||= ["Overview", "Working", "Failed", "Queues", "Workers", "Stats"]
end

Instance Method Details

#resqueObject



193
194
195
# File 'lib/resque/server.rb', line 193

def resque
  Resque
end

#show(page, layout = true) ⇒ Object



105
106
107
108
109
110
111
# File 'lib/resque/server.rb', line 105

def show(page, layout = true)
  begin
    erb page.to_sym, {:layout => layout}, :resque => Resque
  rescue Errno::ECONNREFUSED
    erb :error, {:layout => false}, :error => "Can't connect to Redis! (#{Resque.redis.server})"
  end
end