Skip to content

Commit

Permalink
chore(webhook): change var name to defaultSettingsWebhookMaxConcurren…
Browse files Browse the repository at this point in the history
…tAppRefresh

Signed-off-by: phanama <[email protected]>
  • Loading branch information
phanama committed Sep 3, 2023
1 parent 507530c commit b01e6a7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions util/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -1436,12 +1436,12 @@ func updateSettingsFromConfigMap(settings *ArgoCDSettings, argoCDCM *apiv1.Confi
log.Warnf("invalid input for %s: %s. Using the default value %d.", settingsWebhookMaxConcurrentAppRefreshKey, err.Error(), defaultWebhookMaxConcurrentAppRefresh)

Check failure on line 1436 in util/settings/settings.go

View workflow job for this annotation

GitHub Actions / Build & cache Go code

undefined: defaultWebhookMaxConcurrentAppRefresh
}
if i < 1 {
i = defaultWebhookMaxConcurrentAppRefresh
i = defaultSettingsWebhookMaxConcurrentAppRefresh
log.Warnf("%s is less than 1. Using the default value %d.", settingsWebhookMaxConcurrentAppRefreshKey, defaultWebhookMaxConcurrentAppRefresh)

Check failure on line 1440 in util/settings/settings.go

View workflow job for this annotation

GitHub Actions / Build & cache Go code

undefined: defaultWebhookMaxConcurrentAppRefresh
}
settings.WebhookMaxConcurrentAppRefresh = i
} else {
settings.WebhookMaxConcurrentAppRefresh = defaultWebhookMaxConcurrentAppRefresh
settings.WebhookMaxConcurrentAppRefresh = defaultSettingsWebhookMaxConcurrentAppRefresh
}
}

Expand Down

0 comments on commit b01e6a7

Please sign in to comment.