Restructure omni services and add Chatwoot research snapshot

This commit is contained in:
Ruslan Bakiev
2026-02-21 11:11:27 +07:00
parent edea7a0034
commit b73babbbf6
7732 changed files with 978203 additions and 32 deletions

View File

@@ -0,0 +1,24 @@
class Dispatcher
include Singleton
attr_reader :async_dispatcher, :sync_dispatcher
def self.dispatch(event_name, timestamp, data, async = false)
Rails.configuration.dispatcher.dispatch(event_name, timestamp, data, async)
end
def initialize
@sync_dispatcher = SyncDispatcher.new
@async_dispatcher = AsyncDispatcher.new
end
def dispatch(event_name, timestamp, data, _async = false)
@sync_dispatcher.dispatch(event_name, timestamp, data)
@async_dispatcher.dispatch(event_name, timestamp, data)
end
def load_listeners
@sync_dispatcher.load_listeners
@async_dispatcher.load_listeners
end
end