spec/jobs.rb in asynchronic-1.0.0 vs spec/jobs.rb in asynchronic-1.1.0
- old
+ new
@@ -202,6 +202,27 @@
@counter += 1
raise 'Counter < 3' if @counter < 3
@counter
end
end
+end
+
+class NestedJobWithDifferentsQueues < Asynchronic::Job
+ def call
+ async Level1, input: params[:input]
+ result Level1
+ end
+
+ class Level1 < Asynchronic::Job
+ queue :other_queue
+ def call
+ async Level2, input: params[:input] + 1
+ result Level2
+ end
+
+ class Level2 < Asynchronic::Job
+ def call
+ params[:input] + 1
+ end
+ end
+ end
end
\ No newline at end of file