lib/ruote/worker.rb
# One worker step, fetches schedules and triggers those whose time has
# came, then fetches msgs and processes them.
#
One worker step, fetches schedules and triggers those whose time has
came, then fetches msgs and processes them.
One worker step fetches schedules and triggers those whose time has came then fetches msgs and processes them .
def step
      begin_step
      @msg = nil
      @processed_msgs = 0
      determine_state
      if @state == 'stopped'
        return
      elsif @state == 'running'
        process_schedules
        process_msgs
      end
      take_a_rest 
    rescue => err
      handle_step_error(err, @msg) 
    end
def step begin_step @msg = nil @processed_msgs = 0 determine_state if @state == 'stopped' return elsif @state == 'running' process_schedules process_msgs end take_a_rest rescue => err handle_step_error ( err , @msg ) end
One worker step, fetches schedules and triggers those whose time has
came, then fetches msgs and processes them.
One worker step fetches schedules and triggers those whose time has came then fetches msgs and processes them .
# 'running' or 'paused' # msg may be nil