require File.expand_path('../boot', __FILE__)
require 'que/web'
map '/que' do
use Rack::Session::Cookie, :secret => 'insecure', :key => 'que.examples.rack'
run Que::Web
end
map '/success' do
run lambda { |env|
SuccessJob.enqueue 'arg1', {name: 'foo', age: 10}
[200, {}, ['Success job enqueued']]
}
end
map '/fail' do
run lambda { |env|
FailJob.enqueue 'arg1', {name: 'fail', age: 20, numbers: [10]*50}
[200, {}, ['Failing job queued']]
}
end
map '/xss' do
run lambda { |env|
FailJob.enqueue '', {name: '