Class: Webhookdb::Jobs::SendWebhook
- Inherits:
-
Object
- Object
- Webhookdb::Jobs::SendWebhook
- Extended by:
- Async::Job
- Includes:
- Amigo::DurableJob
- Defined in:
- lib/webhookdb/jobs/send_webhook.rb
Instance Method Summary collapse
Methods included from Async::Job
Methods included from Amigo::DurableJob
enabled?, ensure_jobs_tables, heartbeat, heartbeat!, included, insert_job, lock_job, poll_jobs, reconnect, replace_database_settings, set_database_setting, storage_datasets, unlock_job
Instance Method Details
#_perform(event) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/webhookdb/jobs/send_webhook.rb', line 11 def _perform(event) sint = self.lookup_model(Webhookdb::ServiceIntegration, event) self.(sint.) do sint.all_webhook_subscriptions_dataset.to_notify.each do |sub| payload = {service_name: sint.service_name, table_name: sint.table_name, **event.payload[1]} sub.enqueue_delivery(payload) end end end |