v2 #2
7
app.go
7
app.go
@ -156,7 +156,12 @@ func (a *App) Cleanup(now time.Time) error {
|
||||
|
||||
for _, src := range a.sources {
|
||||
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("")
|
||||
return err
|
||||
} else if expired {
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by version.sh (@generated) DO NOT EDIT.
|
||||
package main
|
||||
var githash = "aa8d203"
|
||||
var githash = "c372d43"
|
||||
var branch = "v2"
|
||||
var buildstamp = "2023-06-30_20:03:47"
|
||||
var commits = "62"
|
||||
var version = "aa8d203-b62 - 2023-06-30_20:03:47"
|
||||
var buildstamp = "2023-06-30_22:15:16"
|
||||
var commits = "63"
|
||||
var version = "c372d43-b63 - 2023-06-30_22:15:16"
|
||||
|
Loading…
Reference in New Issue
Block a user