Class: Lapsoss::Router
- Inherits:
-
Object
- Object
- Lapsoss::Router
- Defined in:
- lib/lapsoss/router.rb
Class Method Summary collapse
-
.process_event(event) ⇒ Object
Processes an event by dispatching it to all active adapters.
Class Method Details
.process_event(event) ⇒ Object
Processes an event by dispatching it to all active adapters. The actual dispatch (sync/async) is handled by the Client.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/lapsoss/router.rb', line 10 def process_event(event) adapters = Registry.instance.active Lapsoss.configuration.logger.debug("[LAPSOSS ROUTER] Processing event to #{adapters.length} adapters: #{adapters.map(&:name).join(', ')}") adapters.each do |adapter| Lapsoss.configuration.logger.info("[LAPSOSS ROUTER] About to call #{adapter.name}.capture") adapter.capture(event) Lapsoss.configuration.logger.info("[LAPSOSS ROUTER] Adapter #{adapter.name} completed") rescue StandardError => e handle_adapter_error(adapter, event, e) end end |