From 4e328d3edcdb6d2b1157f0d0b5a1ea2ff5d26108 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Fri, 4 May 2018 08:49:45 -0700 Subject: [PATCH] Use new UpdateRecoveryStatus method (#466) --- .../typed/stash/v1alpha1/util/recovery.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/client/clientset/versioned/typed/stash/v1alpha1/util/recovery.go b/client/clientset/versioned/typed/stash/v1alpha1/util/recovery.go index 00128184e..df0ddd843 100644 --- a/client/clientset/versioned/typed/stash/v1alpha1/util/recovery.go +++ b/client/clientset/versioned/typed/stash/v1alpha1/util/recovery.go @@ -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" @@ -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