Purge: Sleep 250ms to give database time for other tasks
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
556a0dd38b
commit
b865203d89
1 changed files with 5 additions and 0 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
"path"
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"github.com/photoprism/photoprism/internal/config"
|
||||
"github.com/photoprism/photoprism/internal/event"
|
||||
|
@ -110,6 +111,8 @@ func (prg *Purge) Start(opt PurgeOptions) (purgedFiles map[string]bool, purgedPh
|
|||
}
|
||||
|
||||
offset += limit
|
||||
|
||||
time.Sleep(250 * time.Millisecond)
|
||||
}
|
||||
|
||||
limit = 500
|
||||
|
@ -159,6 +162,8 @@ func (prg *Purge) Start(opt PurgeOptions) (purgedFiles map[string]bool, purgedPh
|
|||
}
|
||||
|
||||
offset += limit
|
||||
|
||||
time.Sleep(250 * time.Millisecond)
|
||||
}
|
||||
|
||||
if err := query.ResetPhotosQuality(); err != nil {
|
||||
|
|
Loading…
Reference in a new issue