fix(db): limits max connection to avoid data loss

This commit is contained in:
js0ny 2025-12-06 11:09:40 +00:00
parent 9db0a7013a
commit b8fd649ccf
2 changed files with 3 additions and 0 deletions

View file

@ -131,6 +131,8 @@ func main() {
slog.Warn("Failed to set busy timeout", "error", err)
}
db.SetMaxOpenConns(1)
// Create table
createTableSQL := `CREATE TABLE IF NOT EXISTS drone_events (
id INTEGER PRIMARY KEY AUTOINCREMENT,