File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2634,10 +2634,7 @@ func cleanUpTempZip(zipFilePath string) {
26342634 ),
26352635 )
26362636 tries --
2637- // Calculate exponential backoff delay
2638- waitDuration := time .Duration (cleanupRetryWaitSeconds * (1 << (attempt - 1 ))) // 2^(attempt-1)
2639- logger .PrintIfVerbose (fmt .Sprintf ("Waiting %d seconds before retrying..." , waitDuration ))
2640- time .Sleep (waitDuration * time .Second )
2637+ Wait (attempt )
26412638 } else {
26422639 logger .PrintIfVerbose ("Removed temporary zip" )
26432640 break
@@ -2651,6 +2648,13 @@ func cleanUpTempZip(zipFilePath string) {
26512648 }
26522649}
26532650
2651+ func Wait (attempt int ) {
2652+ // Calculate exponential backoff delay
2653+ waitDuration := time .Duration (cleanupRetryWaitSeconds * (1 << (attempt - 1 ))) // 2^(attempt-1)
2654+ logger .PrintIfVerbose (fmt .Sprintf ("Waiting %d seconds before retrying..." , waitDuration ))
2655+ time .Sleep (waitDuration * time .Second )
2656+ }
2657+
26542658func deprecatedFlagValue (cmd * cobra.Command , deprecatedFlagKey , inUseFlagKey string ) string {
26552659 flagValue , _ := cmd .Flags ().GetString (inUseFlagKey )
26562660 if flagValue == "" {
You can’t perform that action at this time.
0 commit comments