test/batch/worker_test.rb
# Send Even counts to the main collection with odd results to the :odd
# category
Send Even counts to the main collection with odd results to the :odd
category
Send Even counts to the main collection with odd results to the : odd category
def perform(count)
        if count.even?
          count
        else
          RocketJob::Batch::Result.new(:odd, count)
        end
      end
def perform ( count ) if count . even? count else RocketJob :: Batch :: Result . new ( :odd , count ) end end
Send Even counts to the main collection with odd results to the :odd
category
Send Even counts to the main collection with odd results to the : odd category
# This result will go to the default output collection / category # Specify the :odd output category as registered above
count