Sha256: f83f390aaf94d41be6dfb55b6bb97bae1505463f6ce6ef38c16213145bad89df
Contents?: true
Size: 669 Bytes
Versions: 71
Compression:
Stored size: 669 Bytes
Contents
$:.unshift "lib" require 'backburner' $error = 0 class User include Backburner::Performable attr_accessor :id, :name def self.foo(x, y) $error += 1 raise "fail #{$error}" unless $error > 3 puts "User #foo args [#{x}, #{y}] Success!!" end end # Configure Backburner Backburner.configure do |config| config.beanstalk_url = "beanstalk://127.0.0.1" config.tube_namespace = "demo.production" config.on_error = lambda { |e| puts "HEY!!! #{e.class}" } config.max_job_retries = 3 config.retry_delay = 0 end # Enqueue tasks User.async(:queue => "retried").foo("bar", "baz") # Run work # Backburner.default_queues << "user" Backburner.work
Version data entries
71 entries across 71 versions & 2 rubygems