upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-12-11 13:29:30 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-12-11 13:29:30 +0000
commit0f1ea0290d1b5418ec1d22bfa7c837e767a35d6c (patch)
treeebc3294f956ee4f647f32aed6773401bc4d6d025 /src/config.rs
parent9d1545b7b13bc6cd3b0a075865918ceaad9e07ff (diff)
chore: remove unused sync config fields
Remove 4 config fields that were defined but never used: - sync_startup_delay_secs - sync_reconnect_delay_secs - sync_reconnect_lookback_days - sync_startup_jitter_ms These fields were added during GRASP-02 planning but the implementation took a different approach (using hardcoded constants for quick reconnect windows and batch window via env var).
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/config.rs b/src/config.rs
index 178e840..f3a3e2a 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -93,23 +93,6 @@ pub struct Config {
93 #[arg(long, env = "NGIT_SYNC_MAX_BACKOFF_SECS", default_value_t = 3600)] 93 #[arg(long, env = "NGIT_SYNC_MAX_BACKOFF_SECS", default_value_t = 3600)]
94 pub sync_max_backoff_secs: u64, 94 pub sync_max_backoff_secs: u64,
95 95
96 /// Delay in seconds before running startup catchup (default: 30)
97 #[arg(long, env = "NGIT_SYNC_STARTUP_DELAY_SECS", default_value_t = 30)]
98 pub sync_startup_delay_secs: u64,
99
100 /// Delay in seconds before running reconnect catchup (default: 10)
101 #[arg(long, env = "NGIT_SYNC_RECONNECT_DELAY_SECS", default_value_t = 10)]
102 pub sync_reconnect_delay_secs: u64,
103
104 /// Number of days to look back for reconnect catchup (default: 3)
105 #[arg(long, env = "NGIT_SYNC_RECONNECT_LOOKBACK_DAYS", default_value_t = 3)]
106 pub sync_reconnect_lookback_days: u64,
107
108 /// Maximum startup jitter in milliseconds for sync connections (default: 10000 = 10 seconds)
109 /// Set to 0 to disable jitter (useful for testing)
110 #[arg(long, env = "NGIT_SYNC_STARTUP_JITTER_MS", default_value_t = 10_000)]
111 pub sync_startup_jitter_ms: u64,
112
113 /// Interval in seconds for checking disconnected relays and attempting reconnection (default: 60) 96 /// Interval in seconds for checking disconnected relays and attempting reconnection (default: 60)
114 /// Set to lower value for faster reconnection testing 97 /// Set to lower value for faster reconnection testing
115 #[arg(long, env = "NGIT_SYNC_DISCONNECT_CHECK_INTERVAL_SECS", default_value_t = 60)] 98 #[arg(long, env = "NGIT_SYNC_DISCONNECT_CHECK_INTERVAL_SECS", default_value_t = 60)]
@@ -178,10 +161,6 @@ impl Config {
178 metrics_top_n_repos: 10, 161 metrics_top_n_repos: 10,
179 sync_bootstrap_relay_url: None, 162 sync_bootstrap_relay_url: None,
180 sync_max_backoff_secs: 3600, 163 sync_max_backoff_secs: 3600,
181 sync_startup_delay_secs: 30,
182 sync_reconnect_delay_secs: 10,
183 sync_reconnect_lookback_days: 3,
184 sync_startup_jitter_ms: 10_000,
185 sync_disconnect_check_interval_secs: 60, 164 sync_disconnect_check_interval_secs: 60,
186 sync_base_backoff_secs: 5, 165 sync_base_backoff_secs: 5,
187 } 166 }