test/fixtures/test_jobs.rb in backburner-1.0.0 vs test/fixtures/test_jobs.rb in backburner-1.1.0

- old
+ new

@@ -25,9 +25,24 @@ raise RuntimeError unless $worker_test_count > 2 $worker_success = true end end +class TestConfigurableRetryJob + include Backburner::Queue + def self.perform(retry_count) + $worker_test_count += 1 + raise RuntimeError unless $worker_test_count > retry_count + $worker_success = true + end +end + class TestAsyncJob include Backburner::Performable def self.foo(x, y); $worker_test_count = x * y; end -end \ No newline at end of file +end + +class TestLambdaQueueJob + include Backburner::Queue + queue lambda { |klass| klass.calculated_queue_name } + def self.calculated_queue_name; 'lambda-queue' end +end