Class: Resque::Server
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- Resque::Server
- Defined in:
- lib/resque/server.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.tabs ⇒ Object
226 227 228 |
# File 'lib/resque/server.rb', line 226 def self.tabs @tabs ||= ["Overview", "Working", "Failed", "Queues", "Workers", "Stats"] end |
Instance Method Details
#resque ⇒ Object
222 223 224 |
# File 'lib/resque/server.rb', line 222 def resque Resque end |
#show(page, layout = true) ⇒ Object
121 122 123 124 125 126 127 |
# File 'lib/resque/server.rb', line 121 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_id})" end end |
#show_for_polling(page) ⇒ Object
129 130 131 132 133 |
# File 'lib/resque/server.rb', line 129 def show_for_polling(page) content_type "text/html" @polling = true show(page.to_sym, false).gsub(/\s{1,}/, ' ') end |