Skip to content

Commit 06a6762

Browse files
committed
Move sleep
1 parent 9501b94 commit 06a6762

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/ws-daemon/pkg/controller/workspace_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,6 @@ func (wsc *WorkspaceController) handleWorkspaceStop(ctx context.Context, ws *wor
262262
span, ctx := opentracing.StartSpanFromContext(ctx, "handleWorkspaceStop")
263263
defer tracing.FinishSpan(span, &err)
264264

265-
time.Sleep(300 * time.Second)
266-
267265
if ws.IsConditionTrue(workspacev1.WorkspaceConditionPodRejected) {
268266
// edge case only exercised for rejected workspace pods
269267
if ws.IsConditionPresent(workspacev1.WorkspaceConditionStateWiped) {
@@ -400,6 +398,8 @@ func (wsc *WorkspaceController) doWorkspaceContentBackup(ctx context.Context, sp
400398
disposeStart := time.Now()
401399
var snapshotName string
402400
var snapshotUrl string
401+
time.Sleep(300 * time.Second)
402+
glog.WithFields(ws.OWI()).WithField("workspace", req.NamespacedName).WithField("phase", ws.Status.Phase).Info("sleeping before backup...")
403403
if ws.Spec.Type == workspacev1.WorkspaceTypeRegular {
404404
snapshotName = storage.DefaultBackup
405405
} else {

0 commit comments

Comments
 (0)