Logs: Reduce severity from error to warning when indexer is busy
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
parent
ce4cb6bd47
commit
2843342d00
5 changed files with 5 additions and 5 deletions
|
@ -77,7 +77,7 @@ func (imp *Import) Start(opt ImportOptions) fs.Done {
|
|||
// Make sure to run import only once, unless otherwise requested.
|
||||
if !opt.NonBlocking {
|
||||
if err := mutex.MainWorker.Start(); err != nil {
|
||||
event.Error(fmt.Sprintf("import: %s", err.Error()))
|
||||
event.Warn(fmt.Sprintf("import: %s", err.Error()))
|
||||
return done
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ func (ind *Index) Start(o IndexOptions) (found fs.Done, updated int) {
|
|||
}
|
||||
|
||||
if err := mutex.MainWorker.Start(); err != nil {
|
||||
event.Error(fmt.Sprintf("index: %s", err.Error()))
|
||||
event.Warn(fmt.Sprintf("index: %s", err.Error()))
|
||||
return found, updated
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ func (w *Moments) Start() (err error) {
|
|||
}
|
||||
}()
|
||||
|
||||
if err := mutex.MainWorker.Start(); err != nil {
|
||||
if err = mutex.MainWorker.Start(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ func (w *Places) Start() (updated []string, err error) {
|
|||
}()
|
||||
|
||||
// Check if a worker is already running.
|
||||
if err := mutex.MainWorker.Start(); err != nil {
|
||||
if err = mutex.MainWorker.Start(); err != nil {
|
||||
log.Warnf("index: %s (update locations)", err.Error())
|
||||
return []string{}, err
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ func (w *Purge) Start(opt PurgeOptions) (purgedFiles map[string]bool, purgedPhot
|
|||
purgedFiles = make(map[string]bool)
|
||||
purgedPhotos = make(map[string]bool)
|
||||
|
||||
if err := mutex.MainWorker.Start(); err != nil {
|
||||
if err = mutex.MainWorker.Start(); err != nil {
|
||||
log.Warnf("purge: %s (start)", err.Error())
|
||||
return purgedFiles, purgedPhotos, 0, err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue