v2 #2

Merged
shoopea merged 29 commits from v2 into master 2023-08-21 20:03:11 +02:00
2 changed files with 10 additions and 5 deletions
Showing only changes of commit db05789cfe - Show all commits

7
app.go
View File

@ -156,7 +156,12 @@ func (a *App) Cleanup(now time.Time) error {
for _, src := range a.sources { for _, src := range a.sources {
for _, s := range cfg.box[src.Box()].zfs.filesystems[src.Path()].snapshots { for _, s := range cfg.box[src.Box()].zfs.filesystems[src.Path()].snapshots {
if expired, err := s.Expired(now); err != nil { if !s.Valid() {
if err := s.Delete(); err != nil {
log.WithFields(log.Fields{"app": a.name, "now": now, "box": src.Box(), "snapshot": s.String(), "call": "Delete", "error": err}).Errorf("")
return err
}
} else if expired, err := s.Expired(now); err != nil {
log.WithFields(log.Fields{"app": a.name, "now": now, "box": src.Box(), "snapshot": s.String(), "call": "Expired", "error": err}).Errorf("") log.WithFields(log.Fields{"app": a.name, "now": now, "box": src.Box(), "snapshot": s.String(), "call": "Expired", "error": err}).Errorf("")
return err return err
} else if expired { } else if expired {

View File

@ -1,7 +1,7 @@
// Code generated by version.sh (@generated) DO NOT EDIT. // Code generated by version.sh (@generated) DO NOT EDIT.
package main package main
var githash = "aa8d203" var githash = "c372d43"
var branch = "v2" var branch = "v2"
var buildstamp = "2023-06-30_20:03:47" var buildstamp = "2023-06-30_22:15:16"
var commits = "62" var commits = "63"
var version = "aa8d203-b62 - 2023-06-30_20:03:47" var version = "c372d43-b63 - 2023-06-30_22:15:16"