Pull request: upd-fmt
Merge in DNS/adguard-home from upd-fmt to master Squashed commit of the following: commit 73d9a71feccd8256841ae5a01e4a6aae0bcb2f65 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Aug 31 18:37:39 2022 +0300 all: upd fmt
This commit is contained in:
@@ -423,9 +423,9 @@ func (s *StatsCtx) flush() (cont bool, sleepFor time.Duration) {
|
||||
|
||||
// periodicFlush checks and flushes the unit to the database if the freshly
|
||||
// generated unit ID differs from the current's ID. Flushing process includes:
|
||||
// - swapping the current unit with the new empty one;
|
||||
// - writing the current unit to the database;
|
||||
// - removing the stale unit from the database.
|
||||
// - swapping the current unit with the new empty one;
|
||||
// - writing the current unit to the database;
|
||||
// - removing the stale unit from the database.
|
||||
func (s *StatsCtx) periodicFlush() {
|
||||
for cont, sleepFor := true, time.Duration(0); cont; time.Sleep(sleepFor) {
|
||||
cont, sleepFor = s.flush()
|
||||
|
||||
Reference in New Issue
Block a user