commit 438de01330d17afb21f8ff2c7097632dc6fc3abf
parent 1e9cc590694780e8363d109b1c88154fe78be4b1
Author: Joel-Haeberli <haebu@rubigen.ch>
Date: Sun, 2 Jun 2024 12:05:17 +0200
log: enhance logging
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/c2ec/exponential-backoff.go b/c2ec/exponential-backoff.go
@@ -5,7 +5,6 @@ import (
"fmt"
"math"
"math/big"
- "strconv"
"time"
)
@@ -40,8 +39,8 @@ func ShouldStartRetry(
now := time.Now().Unix()
backoffTime := lastExecution.Unix() + randomizedBackoff
- LogInfo("exponential-backoff", fmt.Sprintf("lastExec=%d, now=%d, backoffTime=%d, shouldStartRetry=%s", lastExecution.Unix(), now, backoffTime, strconv.FormatBool(now <= backoffTime)))
- return now <= backoffTime
+ // LogInfo("exponential-backoff", fmt.Sprintf("lastExec=%d, now=%d, backoffTime=%d, shouldStartRetry=%s", lastExecution.Unix(), now, backoffTime, strconv.FormatBool(now >= backoffTime)))
+ return now >= backoffTime
}
func exponentialBackoffMs(retries int) int64 {