Skip to content

Commit

Permalink
Merge pull request #12 from gleicon/db-fixes
Browse files Browse the repository at this point in the history
added missing for{} into the GC goroutine
  • Loading branch information
gleicon committed Aug 4, 2020
2 parents f3dea0c + 337b3db commit acba9e5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions db/badger.go
Expand Up @@ -35,9 +35,11 @@ func NewBadgerDatastorage(dbpath string) (*BadgerDatastorage, error) {
return nil, err
}
go func() {
log.Println("Database housekeeping")
bds.cleanup()
time.Sleep(5 * time.Minute)
for {
log.Println("Database housekeeping")
bds.cleanup()
time.Sleep(5 * time.Minute)
}
}()
return &bds, nil
}
Expand Down

0 comments on commit acba9e5

Please sign in to comment.