From 6140775e3d7bcf6e1391733f4c60edf5c6a34835 Mon Sep 17 00:00:00 2001 From: Yusan Kurban <21994267+yusank@users.noreply.github.com> Date: Tue, 4 Jan 2022 16:12:24 +0800 Subject: [PATCH] External Scaler: fix wrong calculation of retry backoff duration (#2416) Signed-off-by: yusank Signed-off-by: alex60217101990 --- CHANGELOG.md | 1 + pkg/scalers/external_scaler.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9a7b856201..2c8f01d36a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ - PostgreSQL Scaler: Assign PostgreSQL `userName` to correct attribute ([#2432](https://github.com/kedacore/keda/pull/2432))|([#2433](https://github.com/kedacore/keda/pull/2433)) - Kafka Scaler: concurrently query brokers for consumer and producer offsets ([#2405](https://github.com/kedacore/keda/pull/2405)) - Delete the cache entry when a ScaledObject is deleted ([#2408](https://github.com/kedacore/keda/pull/2408)) +- External Scaler: fix wrong calculation of retry backoff duration ([#2416](https://github.com/kedacore/keda/pull/2416)) ### Breaking Changes diff --git a/pkg/scalers/external_scaler.go b/pkg/scalers/external_scaler.go index 6a7f8693b41..3e3fe0b871a 100644 --- a/pkg/scalers/external_scaler.go +++ b/pkg/scalers/external_scaler.go @@ -236,7 +236,7 @@ func (s *externalPushScaler) Run(ctx context.Context, active chan<- bool) { // timer, to release background resources. retryBackoff := func() *time.Timer { tmr := time.NewTimer(retryDuration) - retryDuration *= time.Second * 2 + retryDuration *= 2 if retryDuration > time.Minute*1 { retryDuration = time.Minute * 1 }