Config: Reduce MinWakeupInterval from 1m to 1s

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-12-05 15:04:38 +01:00
parent e4c571fa5b
commit 152c45d2b6
3 changed files with 3 additions and 3 deletions

View File

@@ -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() {

View File

@@ -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.

View File

@@ -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