Config: Reduce auto index & import safety delay defaults

New auto indexing safety delay default is 5 min.
New auto import safety delay default is 3 min.
Previous was the same as wakeup interval, which is 15 min by default.
This commit is contained in:
Michael Mayer 2021-01-26 12:06:33 +01:00
parent 09f2c15edd
commit 91e6a33197

View file

@ -380,7 +380,7 @@ func (c *Config) AutoIndex() time.Duration {
if c.options.AutoIndex < 0 {
return time.Duration(0)
} else if c.options.AutoIndex == 0 || c.options.AutoIndex > 86400 {
return c.WakeupInterval()
return 5 * time.Minute
}
return time.Duration(c.options.AutoIndex) * time.Second
@ -391,7 +391,7 @@ func (c *Config) AutoImport() time.Duration {
if c.options.AutoImport < 0 || c.ReadOnly() {
return time.Duration(0)
} else if c.options.AutoImport == 0 || c.options.AutoImport > 86400 {
return c.AutoIndex()
return 3 * time.Minute
}
return time.Duration(c.options.AutoImport) * time.Second