Class: Webhookdb::Replicator::FakeBackfillWithCriteria::CriteriaStoringBackfiller
- Inherits:
-
Backfiller
- Object
- Backfiller
- Webhookdb::Replicator::FakeBackfillWithCriteria::CriteriaStoringBackfiller
- Defined in:
- lib/webhookdb/replicator/fake.rb
Instance Method Summary collapse
- #fetch_backfill_page(_pagination_token, **_kwargs) ⇒ Object
- #handle_item(body) ⇒ Object
-
#initialize(svc, kw) ⇒ CriteriaStoringBackfiller
constructor
A new instance of CriteriaStoringBackfiller.
Methods inherited from Backfiller
#_fetch_backfill_page_with_retry, #backfill, do_retry_wait, #max_backfill_retry_attempts, #wait_for_retry_attempt
Constructor Details
#initialize(svc, kw) ⇒ CriteriaStoringBackfiller
Returns a new instance of CriteriaStoringBackfiller.
301 302 303 304 305 |
# File 'lib/webhookdb/replicator/fake.rb', line 301 def initialize(svc, kw) @svc = svc @kw = kw super() end |
Instance Method Details
#fetch_backfill_page(_pagination_token, **_kwargs) ⇒ Object
312 313 314 |
# File 'lib/webhookdb/replicator/fake.rb', line 312 def fetch_backfill_page(_pagination_token, **_kwargs) return [[{"my_id" => "x", "at" => "2022-01-01T00:00:00Z"}], nil] end |
#handle_item(body) ⇒ Object
307 308 309 310 |
# File 'lib/webhookdb/replicator/fake.rb', line 307 def handle_item(body) body["backfill_kwargs"] = @kw @svc.upsert_webhook_body(body) end |