Browse Source

simplify hello world to the last bit

master
Thomas Riboulet 4 years ago
parent
commit
13e60b8f6a
  1. 17
      hello.rb

17
hello.rb

@ -4,25 +4,10 @@ require 'redis'
require 'sidekiq/api'
require 'haml'
$redis = Redis.new(url: ENV['REDIS_URL'])
class SimpleApp < Sinatra::Base
get '/' do
SinatraWorker.perform_async(msg="beanstalk was pulled")
haml "%h3 Hello THE BEANSTALK AWESOME World!"
end
get '/stats' do
stats = Sidekiq::Stats.new
@failed = stats.failed
@processed = stats.processed
@messages = $redis.lrange('sinkiq-example-messages', 0, -1)
erb :index
end
get '/mu-c9478619-b3ea1fef-e218a7ee-09081759' do
'42'
haml "%h3 Hello World!"
end
end

Loading…
Cancel
Save