mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Portal: Disable index, metadata, share, and sync background workers
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -53,6 +53,8 @@ func Start(conf *config.Config) {
|
||||
log.Errorf("scheduler: %s (backup)", 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)
|
||||
@@ -62,11 +64,18 @@ func Start(conf *config.Config) {
|
||||
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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user