Purge: Increase batch size to 500 and reduce sleep to 50ms

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-05-11 07:51:31 +02:00
parent 2d9be81658
commit 78d1230088

View file

@ -65,7 +65,7 @@ func (prg *Purge) Start(opt PurgeOptions) (purgedFiles map[string]bool, purgedPh
runtime.GC()
}()
limit := 250
limit := 500
offset := 0
for {
@ -112,10 +112,10 @@ func (prg *Purge) Start(opt PurgeOptions) (purgedFiles map[string]bool, purgedPh
offset += limit
time.Sleep(250 * time.Millisecond)
time.Sleep(50 * time.Millisecond)
}
limit = 250
limit = 500
offset = 0
for {
@ -163,7 +163,7 @@ func (prg *Purge) Start(opt PurgeOptions) (purgedFiles map[string]bool, purgedPh
offset += limit
time.Sleep(250 * time.Millisecond)
time.Sleep(50 * time.Millisecond)
}
log.Info("purge: finding hidden photos")