mirror of
https://github.com/miniflux/v2.git
synced 2025-08-26 18:21:01 +00:00
fix(config): FORCE_REFRESH_INTERVAL duration should be in minutes
Regression introduced in commit c6536e8
This commit is contained in:
parent
737f25f441
commit
e8f5c2446c
3 changed files with 4 additions and 4 deletions
|
@ -864,7 +864,7 @@ func TestForceRefreshInterval(t *testing.T) {
|
||||||
t.Fatalf(`Parsing failure: %v`, err)
|
t.Fatalf(`Parsing failure: %v`, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
expected := 42 * time.Second
|
expected := 42 * time.Minute
|
||||||
result := opts.ForceRefreshInterval()
|
result := opts.ForceRefreshInterval()
|
||||||
|
|
||||||
if result != expected {
|
if result != expected {
|
||||||
|
|
|
@ -29,7 +29,7 @@ const (
|
||||||
defaultBasePath = ""
|
defaultBasePath = ""
|
||||||
defaultWorkerPoolSize = 16
|
defaultWorkerPoolSize = 16
|
||||||
defaultPollingFrequency = 60 * time.Minute
|
defaultPollingFrequency = 60 * time.Minute
|
||||||
defaultForceRefreshInterval = 30 * time.Second
|
defaultForceRefreshInterval = 30 * time.Minute
|
||||||
defaultBatchSize = 100
|
defaultBatchSize = 100
|
||||||
defaultPollingScheduler = "round_robin"
|
defaultPollingScheduler = "round_robin"
|
||||||
defaultSchedulerEntryFrequencyMinInterval = 5 * time.Minute
|
defaultSchedulerEntryFrequencyMinInterval = 5 * time.Minute
|
||||||
|
@ -769,7 +769,7 @@ func (o *options) SortedOptions(redactSecret bool) []*option {
|
||||||
"OAUTH2_REDIRECT_URL": o.oauth2RedirectURL,
|
"OAUTH2_REDIRECT_URL": o.oauth2RedirectURL,
|
||||||
"OAUTH2_USER_CREATION": o.oauth2UserCreationAllowed,
|
"OAUTH2_USER_CREATION": o.oauth2UserCreationAllowed,
|
||||||
"DISABLE_LOCAL_AUTH": o.disableLocalAuth,
|
"DISABLE_LOCAL_AUTH": o.disableLocalAuth,
|
||||||
"FORCE_REFRESH_INTERVAL": int(o.forceRefreshInterval.Seconds()),
|
"FORCE_REFRESH_INTERVAL": int(o.forceRefreshInterval.Minutes()),
|
||||||
"POLLING_FREQUENCY": int(o.pollingFrequency.Minutes()),
|
"POLLING_FREQUENCY": int(o.pollingFrequency.Minutes()),
|
||||||
"POLLING_LIMIT_PER_HOST": o.pollingLimitPerHost,
|
"POLLING_LIMIT_PER_HOST": o.pollingLimitPerHost,
|
||||||
"POLLING_PARSING_ERROR_LIMIT": o.pollingParsingErrorLimit,
|
"POLLING_PARSING_ERROR_LIMIT": o.pollingParsingErrorLimit,
|
||||||
|
|
|
@ -139,7 +139,7 @@ func (p *parser) parseLines(lines []string) (err error) {
|
||||||
case "WORKER_POOL_SIZE":
|
case "WORKER_POOL_SIZE":
|
||||||
p.opts.workerPoolSize = parseInt(value, defaultWorkerPoolSize)
|
p.opts.workerPoolSize = parseInt(value, defaultWorkerPoolSize)
|
||||||
case "FORCE_REFRESH_INTERVAL":
|
case "FORCE_REFRESH_INTERVAL":
|
||||||
p.opts.forceRefreshInterval = parseInterval(value, time.Second, defaultForceRefreshInterval)
|
p.opts.forceRefreshInterval = parseInterval(value, time.Minute, defaultForceRefreshInterval)
|
||||||
case "BATCH_SIZE":
|
case "BATCH_SIZE":
|
||||||
p.opts.batchSize = parseInt(value, defaultBatchSize)
|
p.opts.batchSize = parseInt(value, defaultBatchSize)
|
||||||
case "POLLING_FREQUENCY":
|
case "POLLING_FREQUENCY":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue