Skip to content

Commit 9050ebb

Browse files
committed
changed the select case for the cleanuporphanedshadowsecretinterval
1 parent 428bace commit 9050ebb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

controllers/hcpvaultsecretsapp_controller.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,8 @@ func (r *HCPVaultSecretsAppReconciler) startOrphanedShadowSecretCleanup(ctx cont
303303
if ctx.Err() != nil {
304304
err = ctx.Err()
305305
}
306-
default:
307-
// runs the cleanup process once every hour or as specified by the user
308-
time.Sleep(r.CleanupOrphanedShadowSecretInterval)
306+
// runs the cleanup process once every hour or as specified by the user
307+
case <-time.After(r.CleanupOrphanedShadowSecretInterval):
309308
err = r.cleanupOrphanedShadowSecrets(ctx)
310309
}
311310
}

0 commit comments

Comments
 (0)