refactor: bootstrap crate, thin server/worker binaries

This commit is contained in:
2026-10-25 21:16:38 +01:00
parent 04f9c13625
commit 9bf9342fc0
39 changed files with 939 additions and 905 deletions

View File

@@ -75,6 +75,13 @@ pub async fn wire(database_url: &str) -> anyhow::Result<SqliteWireOutput> {
.await
.context("Failed to connect to SQLite database")?;
wire_pool(pool).await
}
/// Migrates an already-connected pool and builds every repository on it.
pub async fn wire_pool(pool: SqlitePool) -> anyhow::Result<SqliteWireOutput> {
use anyhow::Context;
migrate(&pool)
.await
.map_err(|e| anyhow::anyhow!("{e}"))