fix: lazy-load wrapup backgrounds, cap sqlite pool to 4 connections
Some checks failed
CI / Check / Test (push) Failing after 6m32s

backgrounds were decoded to RGBA at startup (~173MB for 9 images).
now only store paths, decode on demand during video generation.
This commit is contained in:
2026-06-04 14:57:47 +02:00
parent 01c1082290
commit dacc057af6
2 changed files with 21 additions and 13 deletions

View File

@@ -990,7 +990,9 @@ pub async fn wire(database_url: &str) -> anyhow::Result<SqliteWireOutput> {
.create_if_missing(true)
.journal_mode(sqlx::sqlite::SqliteJournalMode::Wal)
.busy_timeout(std::time::Duration::from_secs(5));
let pool = sqlx::SqlitePool::connect_with(opts)
let pool = sqlx::pool::PoolOptions::new()
.max_connections(4)
.connect_with(opts)
.await
.context("Failed to connect to SQLite database")?;