mirror of
https://github.com/photoprism/photoprism.git
synced 2026-01-23 02:24:24 +00:00
Config: Reduce MinWakeupInterval from 1m to 1s
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
parent
e4c571fa5b
commit
152c45d2b6
3 changed files with 3 additions and 3 deletions
|
|
@ -713,7 +713,7 @@ func (c *Config) IndexSchedule() string {
|
|||
}
|
||||
|
||||
// WakeupInterval returns the duration between background worker runs
|
||||
// required for face recognition and index maintenance(1-86400s).
|
||||
// required for face recognition and index maintenance (1-86400s).
|
||||
func (c *Config) WakeupInterval() time.Duration {
|
||||
if c.options.WakeupInterval <= 0 {
|
||||
if c.Unsafe() {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ const DefaultAutoIndexDelay = 300 // 5 Minutes
|
|||
const DefaultAutoImportDelay = -1 // Disabled
|
||||
|
||||
// MinWakeupInterval is the minimum allowed interval for the background worker.
|
||||
const MinWakeupInterval = time.Minute // 1 Minute
|
||||
const MinWakeupInterval = time.Second // 1 Second
|
||||
// MaxWakeupInterval is the maximum allowed interval for the background worker.
|
||||
const MaxWakeupInterval = time.Hour * 24 // 1 Day
|
||||
// DefaultWakeupIntervalSeconds is the default worker interval in seconds.
|
||||
|
|
|
|||
|
|
@ -335,7 +335,7 @@ func TestConfig_WakeupInterval(t *testing.T) {
|
|||
|
||||
c.options.WakeupInterval = 45
|
||||
|
||||
assert.Equal(t, "1m0s", c.WakeupInterval().String())
|
||||
assert.Equal(t, "45s", c.WakeupInterval().String())
|
||||
|
||||
c.options.WakeupInterval = 0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue