Skip to content

Commit

Permalink
Fix cache init and update timeouts in stored requests (#4027)
Browse files Browse the repository at this point in the history
  • Loading branch information
linux019 authored Nov 22, 2024
1 parent f987752 commit 2099424
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stored_requests/events/database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (e *DatabaseEventProducer) Invalidations() <-chan events.Invalidation {
}

func (e *DatabaseEventProducer) fetchAll() (fetchErr error) {
timeout := e.cfg.CacheInitTimeout * time.Millisecond
timeout := e.cfg.CacheInitTimeout
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()

Expand Down Expand Up @@ -115,7 +115,7 @@ func (e *DatabaseEventProducer) fetchAll() (fetchErr error) {
}

func (e *DatabaseEventProducer) fetchDelta() (fetchErr error) {
timeout := e.cfg.CacheUpdateTimeout * time.Millisecond
timeout := e.cfg.CacheUpdateTimeout
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()

Expand Down

0 comments on commit 2099424

Please sign in to comment.