Skip to content

Commit e8f5c24

Browse files
committed
fix(config): FORCE_REFRESH_INTERVAL duration should be in minutes
Regression introduced in commit c6536e8
1 parent 737f25f commit e8f5c24

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

internal/config/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ func TestForceRefreshInterval(t *testing.T) {
864864
t.Fatalf(`Parsing failure: %v`, err)
865865
}
866866

867-
expected := 42 * time.Second
867+
expected := 42 * time.Minute
868868
result := opts.ForceRefreshInterval()
869869

870870
if result != expected {

internal/config/options.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const (
2929
defaultBasePath = ""
3030
defaultWorkerPoolSize = 16
3131
defaultPollingFrequency = 60 * time.Minute
32-
defaultForceRefreshInterval = 30 * time.Second
32+
defaultForceRefreshInterval = 30 * time.Minute
3333
defaultBatchSize = 100
3434
defaultPollingScheduler = "round_robin"
3535
defaultSchedulerEntryFrequencyMinInterval = 5 * time.Minute
@@ -769,7 +769,7 @@ func (o *options) SortedOptions(redactSecret bool) []*option {
769769
"OAUTH2_REDIRECT_URL": o.oauth2RedirectURL,
770770
"OAUTH2_USER_CREATION": o.oauth2UserCreationAllowed,
771771
"DISABLE_LOCAL_AUTH": o.disableLocalAuth,
772-
"FORCE_REFRESH_INTERVAL": int(o.forceRefreshInterval.Seconds()),
772+
"FORCE_REFRESH_INTERVAL": int(o.forceRefreshInterval.Minutes()),
773773
"POLLING_FREQUENCY": int(o.pollingFrequency.Minutes()),
774774
"POLLING_LIMIT_PER_HOST": o.pollingLimitPerHost,
775775
"POLLING_PARSING_ERROR_LIMIT": o.pollingParsingErrorLimit,

internal/config/parser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func (p *parser) parseLines(lines []string) (err error) {
139139
case "WORKER_POOL_SIZE":
140140
p.opts.workerPoolSize = parseInt(value, defaultWorkerPoolSize)
141141
case "FORCE_REFRESH_INTERVAL":
142-
p.opts.forceRefreshInterval = parseInterval(value, time.Second, defaultForceRefreshInterval)
142+
p.opts.forceRefreshInterval = parseInterval(value, time.Minute, defaultForceRefreshInterval)
143143
case "BATCH_SIZE":
144144
p.opts.batchSize = parseInt(value, defaultBatchSize)
145145
case "POLLING_FREQUENCY":

0 commit comments

Comments
 (0)