Server overhaul: shared helpers, dead code, synchronous tasks::start, stale comments
crate::lock replaces three poison-tolerant lock helpers; the rate limiter reuses auth::bearer_token; the landing page reuses invites::display_code. Removed: AppError::not_implemented (D-004 placeholder, only its own test used it) and the unused Mutation::mutation_id/entity_type. tasks::start never awaited or failed: now a plain fn returning AppState. Milestone-ownership comments (M2a/M3/M4) rewritten to say what the code does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TQd3pEP9UeN2uifbHknQ7B
This commit is contained in:
@@ -184,7 +184,7 @@ async fn start_runs_generation_catching_up_after_downtime_and_skips_paused_and_d
|
||||
insert_template(&app, &paused, 1, "2026-06", None, true, false).await;
|
||||
insert_template(&app, &deleted, 1, "2026-06", None, false, true).await;
|
||||
// Missing credentials in the test config: push disabled, the scheduler still runs.
|
||||
let state = kvitt_server::tasks::start(app.state.clone()).await.unwrap();
|
||||
let state = kvitt_server::tasks::start(app.state.clone());
|
||||
app.state = state;
|
||||
let deadline = std::time::Instant::now() + Duration::from_secs(5);
|
||||
while periods(&app, &active).await.len() < 3 && std::time::Instant::now() < deadline {
|
||||
|
||||
Reference in New Issue
Block a user