Skip to content

Commit

Permalink
Adding statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
mchavez committed Aug 29, 2024
1 parent 971127c commit b25e00c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/uhttp/dbcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func NewDBCache(ctx context.Context, cfg CacheConfig) (*DBCache, error) {
go func() {
ctxWithTimeout, cancel := context.WithTimeout(
ctx,
time.Duration(180)*time.Minute,
time.Duration(1)*time.Minute,
)
defer cancel()

Expand All @@ -109,6 +109,7 @@ func NewDBCache(ctx context.Context, cfg CacheConfig) (*DBCache, error) {
select {
case <-ctxWithTimeout.Done():
// ctx done, shutting down cache cleanup routine
ticker.Stop()
err := dc.cleanup(ctx)
if err != nil {
l.Debug("shutting down cache failed", zap.Error(err))
Expand Down

0 comments on commit b25e00c

Please sign in to comment.