mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-22 07:53:38 +01:00
Set synchronous PRAGMA instruction to NORMAL
This commit is contained in:
parent
627173e64f
commit
b90a64e2a6
@ -62,6 +62,7 @@ func NewStore(driver, path string) (*Store, error) {
|
||||
if driver == "sqlite" {
|
||||
_, _ = store.db.Exec("PRAGMA foreign_keys=ON")
|
||||
_, _ = store.db.Exec("PRAGMA journal_mode=WAL")
|
||||
_, _ = store.db.Exec("PRAGMA synchronous=NORMAL")
|
||||
// Prevents driver from running into "database is locked" errors
|
||||
// This is because we're using WAL to improve performance
|
||||
store.db.SetMaxOpenConns(1)
|
||||
|
Loading…
Reference in New Issue
Block a user