spec/jobs.rb in asynchronic-1.1.1 vs spec/jobs.rb in asynchronic-1.2.0

- old
+ new

@@ -166,10 +166,11 @@ class WorkerJob < Asynchronic::Job def call end end + class ForwardReferenceJob < Asynchronic::Job def call async BuildReferenceJob async SendReferenceJob, number: result(BuildReferenceJob) result SendReferenceJob @@ -193,10 +194,11 @@ params[:number] + 1 end end end + class WithRetriesJob < Asynchronic::Job def call @counter = 0 retry_when [RuntimeError] do @counter += 1 @@ -204,11 +206,12 @@ @counter end end end -class NestedJobWithDifferentsQueues < Asynchronic::Job + +class NestedJobWithDifferentsQueuesJob < Asynchronic::Job def call async Level1, input: params[:input] result Level1 end @@ -222,7 +225,16 @@ class Level2 < Asynchronic::Job def call params[:input] + 1 end end + end +end + + +class DataJob < Asynchronic::Job + def call + set :text, "Input was #{params[:input]}" + set :value, params[:input] + nil end end \ No newline at end of file