From e85a6d86df98f926bb5c750098eaea329d4ff7a7 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Sun, 17 Jul 2016 11:40:12 +0100 Subject: [PATCH] Remove backup code from db package --- db/db.go | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/db/db.go b/db/db.go index f68a0558..1f85c428 100644 --- a/db/db.go +++ b/db/db.go @@ -37,8 +37,6 @@ type Response struct { } var db *kvs.DB -var quit chan int -var tick *time.Ticker // Setup sets up the connection with the data layer func Setup(opts *cnf.Options) (err error) { @@ -47,8 +45,6 @@ func Setup(opts *cnf.Options) (err error) { db, err = kvs.New(opts.DB.Path) - // backup(opts) - return } @@ -58,8 +54,6 @@ func Exit() { log.WithPrefix("db").Infof("Gracefully shutting down database") - // quit <- 0 - db.Close() } @@ -96,27 +90,6 @@ func Execute(ctx *fibre.Context, txt interface{}) (out []interface{}, err error) } -func backup(opts *cnf.Options) { - - /*tick = time.NewTicker(opts.Backups.Time) - quit = make(chan int) - - go func() { - for { - select { - case <-tick.C: - t := time.Now().Format("2006-01-02T15-04-05") - n := fmt.Sprintf("%s.backup.db", t) - db.Save(n) - case <-quit: - tick.Stop() - return - } - } - }()*/ - -} - func status(e error) interface{} { switch e.(type) { default: