simplify messages

Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
pull/13604/head
Austin Abro 8 months ago
parent e56a6e678f
commit 4e12f9d530
No known key found for this signature in database
GPG Key ID: 92EB5159E403F9D6

@ -40,24 +40,25 @@ type statusWaiter struct {
func (w *statusWaiter) Wait(resourceList ResourceList, timeout time.Duration) error {
ctx, cancel := context.WithTimeout(context.TODO(), timeout)
defer cancel()
w.log("beginning wait for %d resources with timeout of %s", len(resourceList), timeout)
return w.wait(ctx, resourceList, false)
}
func (w *statusWaiter) WaitWithJobs(resourceList ResourceList, timeout time.Duration) error {
ctx, cancel := context.WithTimeout(context.TODO(), timeout)
defer cancel()
w.log("beginning wait for %d resources with timeout of %s", len(resourceList), timeout)
return w.wait(ctx, resourceList, true)
}
func (w *statusWaiter) WaitForDelete(resourceList ResourceList, timeout time.Duration) error {
ctx, cancel := context.WithTimeout(context.TODO(), timeout)
defer cancel()
w.log("beginning wait for %d resources to be deleted with timeout of %s", len(resourceList), timeout)
return w.waitForDelete(ctx, resourceList)
}
func (w *statusWaiter) waitForDelete(ctx context.Context, resourceList ResourceList) error {
deadline, _ := ctx.Deadline()
w.log("beginning wait for %d resources to be deleted with timeout of %v", len(resourceList), time.Until(deadline))
cancelCtx, cancel := context.WithCancel(ctx)
defer cancel()
resources := []object.ObjMetadata{}
@ -95,8 +96,6 @@ func (w *statusWaiter) waitForDelete(ctx context.Context, resourceList ResourceL
}
func (w *statusWaiter) wait(ctx context.Context, resourceList ResourceList, waitForJobs bool) error {
deadline, _ := ctx.Deadline()
w.log("beginning wait for %d resources with timeout of %v", len(resourceList), deadline)
cancelCtx, cancel := context.WithCancel(ctx)
defer cancel()
resources := []object.ObjMetadata{}

Loading…
Cancel
Save