test/fixtures/test_fork_jobs.rb in backburner-1.1.0 vs test/fixtures/test_fork_jobs.rb in backburner-1.2.0.pre
- old
+ new
@@ -55,6 +55,18 @@
def self.foo(x, y)
Backburner::Workers::ThreadsOnFork.enqueue ResponseJob, [{
:worker_test_count_set => x * y
}], :queue => 'response'
end
-end
\ No newline at end of file
+end
+
+class TestJobMultithreadFork
+ include Backburner::Queue
+ queue "test-job-multithread-fork"
+ queue_priority 1000
+ def self.perform(x, y)
+ sleep 1 # simluate work
+ Backburner::Workers::ThreadsOnFork.enqueue ResponseJob, [{
+ :worker_test_count_set => x + y
+ }], :queue => 'response'
+ end
+end