Skip to content

Commit

Permalink
increase report TTL
Browse files Browse the repository at this point in the history
  • Loading branch information
cooldarkdryplace committed May 6, 2018
1 parent 6cdf514 commit 2d3cde4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import (
"time"
)

const TTL = 60 * 5

type Storage struct {
sync.RWMutex
buckets map[string][]Request
Expand All @@ -19,7 +21,7 @@ func NewStorage() *Storage {

go func() {
for t := range time.Tick(5 * time.Second) {
s.Expire(t.Unix() - 20)
s.Expire(t.Unix() - TTL)
}
}()

Expand Down

0 comments on commit 2d3cde4

Please sign in to comment.