Sha256: 5d0d3ada34e262dec8e3c363c02271b10dc12272ffe0a7c8f5b5bf28f8390e3d
Contents?: true
Size: 1.15 KB
Versions: 13
Compression:
Stored size: 1.15 KB
Contents
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 '<script>alert("xss")</script>', {name: '<script>alert("xss")', age: 20, numbers: [10]*50} [200, {}, ['Failing job queued']] } end map '/delay' do run lambda { |env| SuccessJob.enqueue 'arg1', {name: 'delay', age: 30}, run_at: Time.now + 300 [200, {}, ['Delayed job queued']] } end map '/slow' do run lambda { |env| SlowJob.enqueue 'arg1', {name: 'delay', age: 30} [200, {}, ['Slow job queued']] } end map '/delayslow' do run lambda { |env| SlowJob.enqueue 'arg1', {name: 'delayslow', age: 20}, run_at: Time.now + 10 [200, {}, ['Failing job queued']] } end run lambda { |env| [200, {}, ['Hello']] }
Version data entries
13 entries across 13 versions & 1 rubygems