mirror of
https://github.com/retailcrm/mg-transport-core.git
synced 2024-11-25 06:36:03 +03:00
use provided reset period in counters
This commit is contained in:
parent
6385bc177f
commit
1932d489e5
@ -99,7 +99,7 @@ func (a *AtomicCounter) ClearCountersProcessed() {
|
||||
}
|
||||
|
||||
func (a *AtomicCounter) FlushCounters() {
|
||||
if time.Now().After(a.timestamp.Load().Add(time.Minute * 15)) {
|
||||
if time.Now().After(a.timestamp.Load().Add(a.resetPeriod)) {
|
||||
a.timestamp.Store(time.Now())
|
||||
a.success.Store(0)
|
||||
a.failure.Store(0)
|
||||
|
Loading…
Reference in New Issue
Block a user