fix: replace std::sync::Mutex with parking_lot::Mutex (#350)

Merges #422
This commit is contained in:
Argenis 2026-02-16 15:02:46 -05:00 committed by GitHub
parent bff0507132
commit 15e1d50a5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 1595 additions and 17 deletions

View file

@ -422,6 +422,16 @@ fn with_connection<T>(config: &Config, f: impl FnOnce(&Connection) -> Result<T>)
let conn = Connection::open(&db_path)
.with_context(|| format!("Failed to open cron DB: {}", db_path.display()))?;
// ── Production-grade PRAGMA tuning ──────────────────────
conn.execute_batch(
"PRAGMA journal_mode = WAL;
PRAGMA synchronous = NORMAL;
PRAGMA mmap_size = 8388608;
PRAGMA cache_size = -2000;
PRAGMA temp_store = MEMORY;",
)
.context("Failed to set cron DB PRAGMAs")?;
conn.execute_batch(
"PRAGMA journal_mode = WAL;
PRAGMA synchronous = NORMAL;