v0.1.0:25–40 — tier model, edit forms, force-delete, license counts, migration 0009 (and hotfix); KEYSAT_INTEGRATION.md merged with downstream-LLM revisions

This commit is contained in:
Grant
2026-05-07 23:35:22 -05:00
parent 6ac118ae70
commit beedd07f07
27 changed files with 5576 additions and 134 deletions
+17
View File
@@ -98,6 +98,23 @@ async fn main() -> anyhow::Result<()> {
reconcile::spawn(state.clone());
webhooks::spawn_delivery_worker(state.clone());
// Hourly session reaper — drops sessions whose expires_at < now.
{
let pool = state.db.clone();
tokio::spawn(async move {
let mut interval = tokio::time::interval(std::time::Duration::from_secs(3600));
interval.set_missed_tick_behavior(tokio::time::MissedTickBehavior::Delay);
loop {
interval.tick().await;
match db::repo::reap_expired_sessions(&pool).await {
Ok(n) if n > 0 => tracing::info!("reaped {n} expired session(s)"),
Ok(_) => {}
Err(e) => tracing::warn!("session reaper: {e}"),
}
}
});
}
let app = api::router(state).layer(TraceLayer::new_for_http());
// --- serve ---