[GH-18965] - Pass expire time from outside Cleanup method (#19008)

Pass expire time from outside Cleanup method

Fixes #18965
Этот коммит содержится в:
Kirill Krotov
2021-12-22 12:27:30 +03:00
коммит произвёл GitHub
родитель c198ef6e16
Коммит 0dbc74f6d5
9 изменённых файлов: 73 добавлений и 15 удалений

Просмотреть файл

@@ -8519,10 +8519,10 @@ func (s *TimerLayerThreadStore) UpdateUnreadsByChannel(userId string, changedThr
return err
}
func (s *TimerLayerTokenStore) Cleanup() {
func (s *TimerLayerTokenStore) Cleanup(expiryTime int64) {
start := timemodule.Now()
s.TokenStore.Cleanup()
s.TokenStore.Cleanup(expiryTime)
elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
if s.Root.Metrics != nil {