Sha256: 9b89141c87b2885a86830a08b069624db46c92598129f7e6eaafe0a10d560383

Contents?: true

Size: 578 Bytes

Versions: 8

Compression:

Stored size: 578 Bytes

Contents

$worker_test_count = 0
$worker_success = false

class TestJob
  include Backburner::Queue
  queue_priority 1000
  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

8 entries across 8 versions & 1 rubygems

Version Path
backburner-0.3.4 test/fixtures/test_jobs.rb
backburner-0.3.3 test/fixtures/test_jobs.rb
backburner-0.3.2 test/fixtures/test_jobs.rb
backburner-0.3.1 test/fixtures/test_jobs.rb
backburner-0.3.0 test/fixtures/test_jobs.rb
backburner-0.2.6 test/fixtures/test_jobs.rb
backburner-0.2.5 test/fixtures/test_jobs.rb
backburner-0.2.0 test/fixtures/test_jobs.rb