examples/demo_conpriority.rb in pika_que-0.1.6 vs examples/demo_conpriority.rb in pika_que-0.2.0
- old
+ new
@@ -31,13 +31,14 @@
ack!
end
end
-PikaQue.config.add_processor(workers: [LowPriorityWorker], concurrency: 10)
-PikaQue.config.add_processor(workers: [HighPriorityWorker], concurrency: 10)
+PikaQue.config[:processors] << { workers: [LowPriorityWorker], concurrency: 10 }
+PikaQue.config[:processors] << { workers: [HighPriorityWorker], concurrency: 10 }
runner = PikaQue::Runner.new
+runner.setup_processors
begin
runner.run
rescue => e
puts e