Skip to content

Commit

Permalink
rename var
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
  • Loading branch information
timvaillancourt committed Feb 19, 2025
1 parent dab125d commit a443706
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions go/vt/vtorc/discovery/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import (

// queueItem represents an item in the discovery.Queue.
type queueItem struct {
CreatedAt time.Time
Key string
PushedAt time.Time
Key string
}

// Queue is an implementation of discovery.Queue.
Expand All @@ -59,8 +59,8 @@ func (q *Queue) QueueLen() int {
// processed; silently returns otherwise.
func (q *Queue) Push(key string) {
q.queue <- queueItem{
CreatedAt: time.Now(),
Key: key,
PushedAt: time.Now(),
Key: key,
}
}

Expand All @@ -69,7 +69,7 @@ func (q *Queue) Push(key string) {
func (q *Queue) Consume() string {
item := <-q.queue

timeOnQueue := time.Since(item.CreatedAt)
timeOnQueue := time.Since(item.PushedAt)
if timeOnQueue > config.GetInstancePollTime() {
log.Warningf("key %v spent %.4fs waiting on a discovery queue", item.Key, timeOnQueue.Seconds())
}
Expand Down

0 comments on commit a443706

Please sign in to comment.