aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--main.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/main.go b/main.go
index 35b5b80..e65a600 100644
--- a/main.go
+++ b/main.go
@@ -39,6 +39,14 @@ func main() {
}
defer db.Close()
+ log.With("type", "db").Debug("Running GC")
+ err = db.RunValueLogGC(0.5)
+ if err == badger.ErrNoRewrite {
+ log.With("type", "db").Debug("Nothing to GC")
+ } else {
+ log.Fatal(err)
+ }
+
// Persister
persister := models.NewPersister(log, db)