From ae71057e64421c28387a3dd9d0c71ae43bdb7836 Mon Sep 17 00:00:00 2001 From: Lukas Phaf Date: Fri, 12 Jan 2024 16:32:54 +0100 Subject: [PATCH] Fix bug that cleanup runs after every insert. Cleanup interval defaulted to 86400 nanoseconds instead of seconds. --- datastore/datastore/storagebackend/postgresql/postgresql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datastore/datastore/storagebackend/postgresql/postgresql.go b/datastore/datastore/storagebackend/postgresql/postgresql.go index 3dbb4d31..c43b7a69 100644 --- a/datastore/datastore/storagebackend/postgresql/postgresql.go +++ b/datastore/datastore/storagebackend/postgresql/postgresql.go @@ -31,7 +31,7 @@ func initCleanupInterval() { val = defaultVal } - cleanupInterval = time.Duration(val) + cleanupInterval = time.Duration(val) * time.Second } func init() { // automatically called once on program startup (on first import of this package)