Portal: Disable index, metadata, share, and sync background workers

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-10-19 03:42:49 +02:00
parent 1a5dca4871
commit ad1a6dfac1

View File

@@ -53,20 +53,29 @@ func Start(conf *config.Config) {
log.Errorf("scheduler: %s (backup)", err)
}
// Schedule indexing job.
if err = NewJob("index", conf.IndexSchedule(), NewIndex(conf).StartScheduled); err != nil {
log.Errorf("scheduler: %s (index)", err)
}
// Only schedule index and vision jobs if this is not a portal.
if !conf.Portal() {
// Schedule indexing job.
if err = NewJob("index", conf.IndexSchedule(), NewIndex(conf).StartScheduled); err != nil {
log.Errorf("scheduler: %s (index)", err)
}
// Schedule vision job.
if err = NewJob("vision", conf.VisionSchedule(), NewVision(conf).StartScheduled); err != nil {
log.Errorf("scheduler: %s (vision)", err)
// Schedule vision job.
if err = NewJob("vision", conf.VisionSchedule(), NewVision(conf).StartScheduled); err != nil {
log.Errorf("scheduler: %s (vision)", err)
}
}
// Start the scheduler.
Scheduler.Start()
}
// Only run metadata, share & sync background workers if this is not a portal.
if conf.Portal() {
log.Infof("config: disabled metadata, share & sync background workers")
return
}
// Start the other background workers.
interval := conf.WakeupInterval()