Class: Webhookdb::Replicator::IcalendarEventV1::StaleRowDeleter
Overview
Delete CANCELLED events last updated (row_updated_at
)‘ in the window between stale_at
to age_cutoff
. This avoids endlessly adding to the icalendar events table due to feeds that change UIDs each fetch- events with changed UIDs will become CANCELLED, and then deleted over time.
Instance Attribute Summary
#replicator
Instance Method Summary
collapse
#_run_delete, #chunk_size, #incremental_lookback_size, #initialize, #run, #run_initial, #set_autovacuum
Instance Method Details
#lookback_window ⇒ Object
385
|
# File 'lib/webhookdb/replicator/icalendar_event_v1.rb', line 385
def lookback_window = Webhookdb::Icalendar.stale_cancelled_event_lookback_days.days
|
#stale_at ⇒ Object
384
|
# File 'lib/webhookdb/replicator/icalendar_event_v1.rb', line 384
def stale_at = Webhookdb::Icalendar.stale_cancelled_event_threshold_days.days
|
#stale_condition ⇒ Object
387
|
# File 'lib/webhookdb/replicator/icalendar_event_v1.rb', line 387
def stale_condition = {status: "CANCELLED"}
|
#updated_at_column ⇒ Object
386
|
# File 'lib/webhookdb/replicator/icalendar_event_v1.rb', line 386
def updated_at_column = :row_updated_at
|