Class: Webhookdb::Jobs::RenewWatchChannel
- Inherits:
-
Object
- Object
- Webhookdb::Jobs::RenewWatchChannel
- Extended by:
- Async::Job
- Defined in:
- lib/webhookdb/jobs/renew_watch_channel.rb
Overview
Generic helper to renew watch channels, enqueued by replicator-specific jobs like RenewGoogleWatchChannels. Must be emitted with [service integration id, expirng_before:] Calls #renew_watch_channel(row_pk:, expiring_before:).
Instance Method Summary collapse
Methods included from Async::Job
Instance Method Details
#_perform(event) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/webhookdb/jobs/renew_watch_channel.rb', line 15 def _perform(event) sint = self.lookup_model(Webhookdb::ServiceIntegration, event) self.(sint.) do opts = event.payload[1] row_pk = opts.fetch("row_pk") expiring_before = Time.parse(opts.fetch("expiring_before")) sint.replicator.renew_watch_channel(row_pk:, expiring_before:) end end |