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,6 +53,8 @@ func Start(conf *config.Config) {
log.Errorf("scheduler: %s (backup)", err) log.Errorf("scheduler: %s (backup)", err)
} }
// Only schedule index and vision jobs if this is not a portal.
if !conf.Portal() {
// Schedule indexing job. // Schedule indexing job.
if err = NewJob("index", conf.IndexSchedule(), NewIndex(conf).StartScheduled); err != nil { if err = NewJob("index", conf.IndexSchedule(), NewIndex(conf).StartScheduled); err != nil {
log.Errorf("scheduler: %s (index)", err) log.Errorf("scheduler: %s (index)", err)
@@ -62,11 +64,18 @@ func Start(conf *config.Config) {
if err = NewJob("vision", conf.VisionSchedule(), NewVision(conf).StartScheduled); err != nil { if err = NewJob("vision", conf.VisionSchedule(), NewVision(conf).StartScheduled); err != nil {
log.Errorf("scheduler: %s (vision)", err) log.Errorf("scheduler: %s (vision)", err)
} }
}
// Start the scheduler. // Start the scheduler.
Scheduler.Start() 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. // Start the other background workers.
interval := conf.WakeupInterval() interval := conf.WakeupInterval()