From 84ecbb339c56eea8a00d9a573580b06725c640e0 Mon Sep 17 00:00:00 2001 From: phanama Date: Sun, 3 Sep 2023 22:43:45 +0700 Subject: [PATCH] chore(webhook): change var name to defaultSettingsWebhookMaxConcurrentAppRefresh Signed-off-by: phanama --- util/settings/settings.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/util/settings/settings.go b/util/settings/settings.go index 7d4a046ee72a8..f4f9ea92f5323 100644 --- a/util/settings/settings.go +++ b/util/settings/settings.go @@ -495,7 +495,7 @@ const ( // settingsWebhookMaxConcurrentAppRefresh is the key for max concurrent app refresh settingsWebhookMaxConcurrentAppRefreshKey = "webhook.maxConcurrentAppRefresh" // defaultSettingsWebhookMaxConcurrentAppRefresh is the default value for the number of max concurrent app refresh - defaultWebhookMaxConcurrentAppRefresh = 10 + defaultSettingsWebhookMaxConcurrentAppRefresh = 10 ) var ( @@ -1433,15 +1433,15 @@ func updateSettingsFromConfigMap(settings *ArgoCDSettings, argoCDCM *apiv1.Confi if webhookMaxConcurrentAppRefresh := argoCDCM.Data[settingsWebhookMaxConcurrentAppRefreshKey]; len(webhookMaxConcurrentAppRefresh) > 0 { i, err := strconv.Atoi(string(webhookMaxConcurrentAppRefresh)) if err != nil { - log.Warnf("invalid input for %s: %s. Using the default value %d.", settingsWebhookMaxConcurrentAppRefreshKey, err.Error(), defaultWebhookMaxConcurrentAppRefresh) + log.Warnf("invalid input for %s: %s. Using the default value %d.", settingsWebhookMaxConcurrentAppRefreshKey, err.Error(), defaultSettingsWebhookMaxConcurrentAppRefresh) } if i < 1 { - i = defaultWebhookMaxConcurrentAppRefresh - log.Warnf("%s is less than 1. Using the default value %d.", settingsWebhookMaxConcurrentAppRefreshKey, defaultWebhookMaxConcurrentAppRefresh) + i = defaultSettingsWebhookMaxConcurrentAppRefresh + log.Warnf("%s is less than 1. Using the default value %d.", settingsWebhookMaxConcurrentAppRefreshKey, defaultSettingsWebhookMaxConcurrentAppRefresh) } settings.WebhookMaxConcurrentAppRefresh = i } else { - settings.WebhookMaxConcurrentAppRefresh = defaultWebhookMaxConcurrentAppRefresh + settings.WebhookMaxConcurrentAppRefresh = defaultSettingsWebhookMaxConcurrentAppRefresh } }