Skip to main content

spawn_pending_timeout_sweep_loop

Function spawn_pending_timeout_sweep_loop 

Source
pub fn spawn_pending_timeout_sweep_loop(
    state: Db,
    db_path: PathBuf,
    default_secs: i64,
    interval: Duration,
) -> JoinHandle<()>
Expand description

v0.7.0 K2 — spawn the periodic pending_actions timeout sweeper.

Sleeps interval, then calls db::sweep_pending_action_timeouts against the daemon’s shared connection. Per-row default_timeout_seconds overrides the global default_secs when non-NULL. A non-positive default_secs disables the sweeper.

Returned JoinHandle is owned by the caller; serve() aborts it on shutdown — same lifecycle as spawn_gc_loop.

Closes the v0.6.3.1 honest-Capabilities-v2 disclosure that the default_timeout_seconds field was advertised but unused.