DatabaseManager takes a *Conf

This commit is contained in:
ppom 2023-09-09 20:42:47 +02:00
parent 2243dda49a
commit da9ed42363
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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)
}