From 2665811f54f62f147b7d773c76bd26d032b8f9cb Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 7 Jan 2026 11:21:26 +0000 Subject: Add SyncQueueEntry with exponential backoff for purgatory sync MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implement the sync queue entry struct that tracks sync state per identifier: - next_attempt: when the next sync should be attempted - attempt_count: for backoff calculation (resets on new events) - in_progress: prevents concurrent syncs for same identifier Backoff schedule: 20s → 40s → 80s → 120s (capped at 2 minutes) This is the foundation for the identifier-based purgatory sync system that will replace the current per-event syncing approach. --- src/purgatory/sync/mod.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/purgatory/sync/mod.rs (limited to 'src/purgatory/sync/mod.rs') diff --git a/src/purgatory/sync/mod.rs b/src/purgatory/sync/mod.rs new file mode 100644 index 0000000..7b6d64a --- /dev/null +++ b/src/purgatory/sync/mod.rs @@ -0,0 +1,11 @@ +//! Purgatory sync module for background git data synchronization. +//! +//! This module implements identifier-based syncing with: +//! - Batched OID fetching across all purgatory events for an identifier +//! - Domain-based throttling (configurable requests/minute per domain) +//! - Exponential backoff per identifier (20s → 2m, then 2m intervals) +//! - Debouncing for burst event arrivals + +mod queue; + +pub use queue::SyncQueueEntry; -- cgit v1.2.3