blob: 022a556c4b15404df935465124910aa88af5b739 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
//! 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
//! - Background sync loop processing ready identifiers every 1 second
mod context;
mod functions;
mod r#loop;
mod queue;
mod throttle;
pub use context::{ProcessResult, RealSyncContext, SyncContext};
pub use functions::{
get_throttled_domains_with_untried_urls, sync_identifier, sync_identifier_from_url,
sync_identifier_next_url, ThrottledDomainInfo,
};
pub use queue::SyncQueueEntry;
pub use throttle::{DomainThrottle, ThrottleManager};
#[cfg(test)]
pub use context::mock::MockSyncContext;
|