From da9ed4236303dc6c445f54f1a2dec58b13341a54 Mon Sep 17 00:00:00 2001 From: ppom <> Date: Sat, 9 Sep 2023 20:42:47 +0200 Subject: [PATCH] DatabaseManager takes a *Conf --- app/daemon.go | 2 +- app/persist.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/daemon.go b/app/daemon.go index 40b4d0b..87b01ce 100644 --- a/app/daemon.go +++ b/app/daemon.go @@ -174,7 +174,7 @@ func Daemon(confFilename string) { logs = make(chan LogEntry) flushes = make(chan LogEntry) - go conf.DatabaseManager() + go DatabaseManager(conf) // Ready to start diff --git a/app/persist.go b/app/persist.go index 0ab3d51..ed400eb 100644 --- a/app/persist.go +++ b/app/persist.go @@ -45,7 +45,7 @@ func createDB(path string) *WriteDB { return &WriteDB{file, gob.NewEncoder(file)} } -func (c *Conf) DatabaseManager() { +func DatabaseManager(c *Conf) { logDB, flushDB := c.RotateDB(true) c.manageLogs(logDB, flushDB) }