Skip to main content

MAX_AGENT_PRUNE_DAYS

Constant MAX_AGENT_PRUNE_DAYS 

Source
pub const MAX_AGENT_PRUNE_DAYS: u32 = 36_500;
Expand description

Upper bound on ServerSettings::agent_prune_days (100 years). A value this large already means “effectively never”, and it keeps the cleanup task’s now - Duration::days(n) subtraction comfortably inside chrono::DateTime’s representable range — DateTime - Duration panics on overflow, and an unbounded u32 (~11.7 M years) would trip it. Enforced two ways: the PUT handler rejects a larger value, and ServerSettings::effective_agent_prune_days clamps to it so even a hand-written KV value can never panic the cleanup task.