mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Improve backend DB concurrency and async safety
Tune SQLite and remove blocking calls from async/scan paths: - Enable WAL + synchronous=NORMAL + busy_timeout + foreign_keys on each pooled connection, so the five scanners, web server, and retention no longer contend on the default rollback journal / FULL fsync. - Run DB work in axum handlers via spawn_blocking (db::run_blocking) so synchronous rusqlite calls no longer block tokio worker threads. - Deliver notifications on a dedicated task fed by a bounded channel; the blocking Pushover HTTP call runs in spawn_blocking, so a slow or unreachable Pushover can never stall device discovery. - Make get_db_connection() return Result instead of panicking, so pool exhaustion surfaces as a 500 rather than crashing the process. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
8749ff33c1
commit
15bbb3bda9
@@ -2,5 +2,7 @@
|
||||
/backend/target
|
||||
/result
|
||||
oott.db
|
||||
oott.db-wal
|
||||
oott.db-shm
|
||||
oott.toml
|
||||
/.claude
|
||||
|
||||
Reference in New Issue
Block a user