From 950c2e4e68448d2abcad90a31bfffaca6d7bc47e Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 4 Dec 2025 18:30:18 +0000 Subject: feat(sync): Phase 5 - negentropy catchup (NIP-77) - Add NegentropyService for set reconciliation - Implement startup catchup with warm-up delay - Implement reconnect catchup (last 3 days) - Add daily catchup schedule with stagger --- src/config.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index 441a14d..0ca534c 100644 --- a/src/config.rs +++ b/src/config.rs @@ -91,6 +91,18 @@ pub struct Config { /// Maximum backoff time in seconds for sync relay reconnection (default: 3600 = 1 hour) #[arg(long, env = "NGIT_SYNC_MAX_BACKOFF_SECS", default_value_t = 3600)] pub sync_max_backoff_secs: u64, + + /// Delay in seconds before running startup catchup (default: 30) + #[arg(long, env = "NGIT_SYNC_STARTUP_DELAY_SECS", default_value_t = 30)] + pub sync_startup_delay_secs: u64, + + /// Delay in seconds before running reconnect catchup (default: 10) + #[arg(long, env = "NGIT_SYNC_RECONNECT_DELAY_SECS", default_value_t = 10)] + pub sync_reconnect_delay_secs: u64, + + /// Number of days to look back for reconnect catchup (default: 3) + #[arg(long, env = "NGIT_SYNC_RECONNECT_LOOKBACK_DAYS", default_value_t = 3)] + pub sync_reconnect_lookback_days: u64, } impl Config { @@ -148,6 +160,9 @@ impl Config { metrics_top_n_repos: 10, sync_relay_url: None, sync_max_backoff_secs: 3600, + sync_startup_delay_secs: 30, + sync_reconnect_delay_secs: 10, + sync_reconnect_lookback_days: 3, } } } -- cgit v1.2.3