diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-07 11:21:26 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-07 11:21:26 +0000 |
| commit | 2665811f54f62f147b7d773c76bd26d032b8f9cb (patch) | |
| tree | a716d2115002cfbc360d74ce695817bc46f8a074 /src/purgatory/mod.rs | |
| parent | 852eddcc33b59ed027e06d30456f6b9e3b9a31cb (diff) | |
Add SyncQueueEntry with exponential backoff for purgatory sync
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.
Diffstat (limited to 'src/purgatory/mod.rs')
| -rw-r--r-- | src/purgatory/mod.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/purgatory/mod.rs b/src/purgatory/mod.rs index 88377fb..34a8e7a 100644 --- a/src/purgatory/mod.rs +++ b/src/purgatory/mod.rs | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | //! - **Separate stores**: State events and PR events use different indexing strategies | 12 | //! - **Separate stores**: State events and PR events use different indexing strategies |
| 13 | 13 | ||
| 14 | mod helpers; | 14 | mod helpers; |
| 15 | pub mod sync; | ||
| 15 | mod types; | 16 | mod types; |
| 16 | 17 | ||
| 17 | use anyhow::{bail, Result}; | 18 | use anyhow::{bail, Result}; |