Class: InstagramConnect::Ingest::Dispatcher
- Inherits:
-
Object
- Object
- InstagramConnect::Ingest::Dispatcher
- Defined in:
- lib/instagram_connect/ingest/dispatcher.rb
Overview
Walks a verified webhook payload, banks every event it contains on the ledger, and routes each one to its handler.
Two rules shape this class:
- Nothing is dropped. An event with no handler, or belonging to no connected account, still gets a row. Meta does not re-deliver, so a counter increment would be the only record that something was lost.
- One bad event cannot poison the batch. Each is wrapped in its own
rescue and marked
failedwith its error, leaving the rest to process.
Instance Method Summary collapse
- #call(payload) ⇒ Object
-
#initialize(config) ⇒ Dispatcher
constructor
A new instance of Dispatcher.
Constructor Details
#initialize(config) ⇒ Dispatcher
Returns a new instance of Dispatcher.
17 18 19 |
# File 'lib/instagram_connect/ingest/dispatcher.rb', line 17 def initialize(config) @config = config end |