Skip to main content

spawn_gc_loop

Function spawn_gc_loop 

Source
pub fn spawn_gc_loop(
    state: Db,
    archive_max_days: Option<i64>,
    interval: Duration,
) -> JoinHandle<()>
Expand description

Spawn the periodic GC loop. Sleeps interval, then runs db::gc and db::auto_purge_archive against the daemon’s shared connection. The returned JoinHandle is owned by the caller; serve() aborts it on shutdown.