Sha256: 94c70c6e096906cf21886d3c56eff3b63736a45d12ae73e9ecf98ae230b6f19c

Contents?: true

Size: 732 Bytes

Versions: 4

Compression:

Stored size: 732 Bytes

Contents

$worker_test_count = 0
$worker_success = false

class TestPlainJob
  def self.queue; "test-plain"; end
  def self.perform(x, y); $worker_test_count += x + y + 1; end
end

class TestJob
  include Backburner::Queue
  queue_priority :medium
  queue_respond_timeout 300
  def self.perform(x, y); $worker_test_count += x + y; end
end

class TestFailJob
  include Backburner::Queue
  def self.perform(x, y); raise RuntimeError; end
end

class TestRetryJob
  include Backburner::Queue
  def self.perform(x, y)
    $worker_test_count += 1
    raise RuntimeError unless $worker_test_count > 2
    $worker_success = true
  end
end

class TestAsyncJob
  include Backburner::Performable
  def self.foo(x, y); $worker_test_count = x * y; end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
backburner-1.0.0 test/fixtures/test_jobs.rb
backburner-0.4.6 test/fixtures/test_jobs.rb
backburner-0.4.5 test/fixtures/test_jobs.rb
backburner-0.4.4 test/fixtures/test_jobs.rb