mirror of
https://github.com/carlostrub/sisyphus
synced 2024-10-31 09:20:15 +00:00
perform backup first
This commit is contained in:
parent
eaca7173f2
commit
7859b98d9c
@ -159,8 +159,8 @@ COPYRIGHT:
|
||||
log.Fatal("Cannot parse duration for learning intervals.")
|
||||
}
|
||||
|
||||
learn(maildirs, dbs)
|
||||
backup(maildirs, dbs)
|
||||
learn(maildirs, dbs)
|
||||
time.Sleep(duration)
|
||||
}
|
||||
}()
|
||||
@ -267,7 +267,7 @@ func backup(maildirs []sisyphus.Maildir, dbs map[sisyphus.Maildir]*bolt.DB) {
|
||||
|
||||
w := bufio.NewWriter(backup)
|
||||
|
||||
err := db.View(func(tx *bolt.Tx) error {
|
||||
err = db.View(func(tx *bolt.Tx) error {
|
||||
_, err := tx.WriteTo(w)
|
||||
return err
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user