lib/pigeon/processor.rb
# Used to reliably switch to the next task and coordinates the required
# hand-off from one to the next.
Used to reliably switch to the next task and coordinates the required
hand-off from one to the next.
Used to reliably switch to the next task and coordinates the required hand - off from one to the next .
def switch_to_next_task!
    if (@task)
      after_task(@task)
      @task.processor = nil
      @task = nil
    end
    if (@queue)
      if (@task = @queue.pop(&@filter))
        before_task(@task)
        @task.run!(self) do
          switch_to_next_task!
        end
      end
    end
  end
def switch_to_next_task! if ( @task ) after_task ( @task ) @task . processor = nil @task = nil end if ( @queue ) if ( @task = @queue . pop ( & @filter ) ) before_task ( @task ) @task . run! ( self ) do switch_to_next_task! end end end end
Used to reliably switch to the next task and coordinates the required
hand-off from one to the next.
Used to reliably switch to the next task and coordinates the required hand - off from one to the next .