Class: Webhookdb::Replicator::FakeBackfillWithCriteria::CriteriaStoringBackfiller

Inherits:
Backfiller
  • Object
show all
Defined in:
lib/webhookdb/replicator/fake.rb

Instance Method Summary collapse

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.



302
303
304
305
306
# File 'lib/webhookdb/replicator/fake.rb', line 302

def initialize(svc, kw)
  @svc = svc
  @kw = kw
  super()
end

Instance Method Details

#fetch_backfill_page(_pagination_token, **_kwargs) ⇒ Object



313
314
315
# File 'lib/webhookdb/replicator/fake.rb', line 313

def fetch_backfill_page(_pagination_token, **_kwargs)
  return [[{"my_id" => "x", "at" => "2022-01-01T00:00:00Z"}], nil]
end

#handle_item(body) ⇒ Object



308
309
310
311
# File 'lib/webhookdb/replicator/fake.rb', line 308

def handle_item(body)
  body["backfill_kwargs"] = @kw
  @svc.upsert_webhook_body(body)
end