refactor: clean history data

This commit is contained in:
710leo 2020-03-29 00:15:22 +08:00
parent f3406af763
commit 3d8d6c6886
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ func (h *History) clean() {
defer h.Unlock()
now := time.Now().Unix()
for key, item := range h.Data {
if now-item.Timestamp > 60 {
if now-item.Timestamp > 2*item.Step {
delete(h.Data, key)
}
}