fix(db): limits max connection to avoid data loss
This commit is contained in:
parent
9db0a7013a
commit
b8fd649ccf
2 changed files with 3 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue