exit data update tracker only upon context completion (#10594)

The data update tracker saver would exit if data wasn't updated for between cycles.
master
Klaus Post 4 years ago committed by GitHub
parent 00eb6f6bc9
commit fdf0ae9167
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      cmd/data-update-tracker.go

@ -236,7 +236,10 @@ func (d *dataUpdateTracker) startSaver(ctx context.Context, interval time.Durati
d.mu.Lock() d.mu.Lock()
if !d.dirty { if !d.dirty {
d.mu.Unlock() d.mu.Unlock()
return if exit {
return
}
continue
} }
d.Saved = UTCNow() d.Saved = UTCNow()
err := d.serialize(&buf) err := d.serialize(&buf)

Loading…
Cancel
Save