Class: Webhookdb::Jobs::WebhookdbResourceNotifyIntegrations
- Inherits:
-
Object
- Object
- Webhookdb::Jobs::WebhookdbResourceNotifyIntegrations
- Extended by:
- Async::Job
- Defined in:
- lib/webhookdb/jobs/webhook_resource_notify_integrations.rb
Overview
All the ‘webhookdb’ integrations are internal, so this endpoint is not hardened thoroughly. If we were to open this up or use it on prod, we need to harden it to support more and slower endpoints (at least by fanning out the work).
Instance Method Summary collapse
Methods included from Async::Job
Instance Method Details
#_perform(event) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/webhookdb/jobs/webhook_resource_notify_integrations.rb', line 18 def _perform(event) cu = self.lookup_model(Webhookdb::Customer, event) Webhookdb::ServiceIntegration.where(service_name: "webhookdb_customer_v1").each do |sint| Webhookdb::Http.post( sint.replicator.webhook_endpoint, cu.values, headers: {"Whdb-Secret" => sint.webhook_secret}, logger: self.logger, timeout: nil, ) end end |