DatabaseManager takes a *Conf
This commit is contained in:
parent
2243dda49a
commit
da9ed42363
@ -174,7 +174,7 @@ func Daemon(confFilename string) {
|
|||||||
|
|
||||||
logs = make(chan LogEntry)
|
logs = make(chan LogEntry)
|
||||||
flushes = make(chan LogEntry)
|
flushes = make(chan LogEntry)
|
||||||
go conf.DatabaseManager()
|
go DatabaseManager(conf)
|
||||||
|
|
||||||
// Ready to start
|
// Ready to start
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ func createDB(path string) *WriteDB {
|
|||||||
return &WriteDB{file, gob.NewEncoder(file)}
|
return &WriteDB{file, gob.NewEncoder(file)}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Conf) DatabaseManager() {
|
func DatabaseManager(c *Conf) {
|
||||||
logDB, flushDB := c.RotateDB(true)
|
logDB, flushDB := c.RotateDB(true)
|
||||||
c.manageLogs(logDB, flushDB)
|
c.manageLogs(logDB, flushDB)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user