Skip to content

Commit

Permalink
Use new UpdateRecoveryStatus method (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha authored May 4, 2018
1 parent 166e928 commit 4e328d3
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions client/clientset/versioned/typed/stash/v1alpha1/util/recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"time"

"github.com/appscode/go/log"
"github.com/appscode/kutil"
api "github.com/appscode/stash/apis/stash/v1alpha1"
cs "github.com/appscode/stash/client/clientset/versioned/typed/stash/v1alpha1"
Expand Down Expand Up @@ -83,22 +82,6 @@ func TryUpdateRecovery(c cs.StashV1alpha1Interface, meta metav1.ObjectMeta, tran
return
}

func SetRecoveryStatus(c cs.StashV1alpha1Interface, rec *api.Recovery, status api.RecoveryStatus) {
_, _, err := PatchRecovery(c, rec, func(in *api.Recovery) *api.Recovery {
in.Status = status
return in
})
if err != nil {
log.Errorln("Error updating recovery status:", rec.Status, "reason:", err)
} else {
log.Infoln("Updated recovery status:", rec.Status)
}
}

func SetRecoveryStatusPhase(c cs.StashV1alpha1Interface, rec *api.Recovery, phase api.RecoveryPhase) {
SetRecoveryStatus(c, rec, api.RecoveryStatus{Phase: phase})
}

func SetRecoveryStats(c cs.StashV1alpha1Interface, recovery *api.Recovery, path string, d time.Duration, phase api.RecoveryPhase) (*api.Recovery, error) {
out, _, err := PatchRecovery(c, recovery, func(in *api.Recovery) *api.Recovery {
found := false
Expand Down

0 comments on commit 4e328d3

Please sign in to comment.