Config: Allow scheduling of indexing and backup tasks #2495 #2608 #4243

Note that this is "bleeding edge" functionality and that the newly added
config option PHOTOPRISM_BACKUP_RETAIN can be set, but does not have any
effect yet. Feedback welcome!

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2024-05-11 19:11:49 +02:00
parent 6a5826e252
commit 0e7c91f1b6
41 changed files with 553 additions and 197 deletions

View File

@@ -0,0 +1,17 @@
package workers
import (
"testing"
"github.com/photoprism/photoprism/internal/config"
)
func TestNewJob(t *testing.T) {
if err := NewJob("", config.DefaultBackupSchedule, func() {}); err == nil {
t.Fatal("expected error")
}
if err := NewJob("test", "", func() {}); err != nil {
t.Fatal(err)
}
}