Skip to content

Commit

Permalink
edited comment to set
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiming1997 committed Aug 16, 2024
1 parent 3d4eef6 commit c51da81
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type redisQueue struct {
unackedKey string // key to list of currently consuming deliveries
readyKey string // key to list of ready deliveries
rejectedKey string // key to list of rejected deliveries
scheduleKey string // key to list of schedule deliveries
scheduleKey string // key to set of schedule deliveries
pushKey string // key to list of pushed deliveries
redisClient RedisClient
errChan chan<- error
Expand Down Expand Up @@ -626,6 +626,7 @@ func jitteredDuration(duration time.Duration) time.Duration {
return time.Duration(float64(duration) * factor)
}

// enqueueSchedule enqueues tasks that already reach the given time to ready list
func (queue *redisQueue) enqueueSchedule() error {
errorCount := 0 //number of consecutive errors

Expand Down Expand Up @@ -671,7 +672,7 @@ func (queue *redisQueue) enqueueSchedule() error {
if err != nil {
return err
}
_, err = pipe.ZRem(context.TODO(), queue.scheduleKey, originalPayload).Result()
_, err = pipe.ZRem(context.TODO(), queue.scheduleKey, val).Result()
if err != nil {
return err
}

Check notice on line 678 in queue.go

View workflow job for this annotation

GitHub Actions / test (1.19.x)

7 statement(s) are not covered by tests.
Expand Down

0 comments on commit c51da81

Please sign in to comment.