spec/jobs.rb in asynchronic-0.2.0 vs spec/jobs.rb in asynchronic-0.2.1
- old
+ new
@@ -164,6 +164,33 @@
class WorkerJob < Asynchronic::Job
def call
end
+end
+
+class ForwardReferenceJob < Asynchronic::Job
+ def call
+ async BuildReferenceJob
+ async SendReferenceJob, number: result(BuildReferenceJob)
+ result SendReferenceJob
+ end
+
+ class BuildReferenceJob < Asynchronic::Job
+ def call
+ 1
+ end
+ end
+
+ class SendReferenceJob < Asynchronic::Job
+ def call
+ async UseReferenceJob, number: params[:number]
+ result UseReferenceJob
+ end
+ end
+
+ class UseReferenceJob < Asynchronic::Job
+ def call
+ params[:number] + 1
+ end
+ end
end
\ No newline at end of file