From 57455d0d6fd8b67d090a075901226864cd946410 Mon Sep 17 00:00:00 2001 From: Storm Timmermans Date: Thu, 10 Sep 2020 11:08:22 +0200 Subject: [PATCH] fix(processor): limit db to one connection (#43) Limiting the database to one connection should resolve the "database is locked" error for processor operations. --- processor/datastore.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/processor/datastore.go b/processor/datastore.go index e3093837..ef227adb 100644 --- a/processor/datastore.go +++ b/processor/datastore.go @@ -31,6 +31,8 @@ func newDatastore(path string) (*datastore, error) { return nil, err } + db.SetMaxOpenConns(1) + _, err = db.Exec(sqlSchema) if err != nil { return nil, err