lib/invoker/event/manager.rb
# On next iteration of event loop, this method is called and we try to match
# scheduled events with events that were triggered. 
On next iteration of event loop, this method is called and we try to match
scheduled events with events that were triggered.
On next iteration of event loop this method is called and we try to match scheduled events with events that were triggered .
def run_scheduled_events
        filtered_events_by_name_and_command = []
        triggered_events.each_with_index do |triggered_event, index|
          matched_events = scheduled_events[triggered_event.command_label]
          if matched_events && !matched_events.empty?
            filtered_events_by_name_and_command, unmatched_events = 
              filter_matched_events(matched_events, triggered_event)
            triggered_events[index] = nil
            remove_scheduled_event(unmatched_events, triggered_event.command_label)
          end
        end
        triggered_events.compact!
        filtered_events_by_name_and_command.each {|event| yield event }
      end
def run_scheduled_events filtered_events_by_name_and_command = [ ] triggered_events . each_with_index do | triggered_event , index | matched_events = scheduled_events [ triggered_event . command_label ] if matched_events && ! matched_events . empty? filtered_events_by_name_and_command , unmatched_events = filter_matched_events ( matched_events , triggered_event ) triggered_events [ index ] = nil remove_scheduled_event ( unmatched_events , triggered_event . command_label ) end end triggered_events . compact! filtered_events_by_name_and_command . each { | event | yield event } end
On next iteration of event loop, this method is called and we try to match
scheduled events with events that were triggered.
On next iteration of event loop this method is called and we try to match scheduled events with events that were triggered .