Skip to content

Commit

Permalink
use mockable time
Browse files Browse the repository at this point in the history
  • Loading branch information
ardhitama committed Nov 30, 2020
1 parent df56732 commit d4a3e64
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions enqueue.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package work

import (
"sync"
"time"

"github.com/gomodule/redigo/redis"
)
Expand Down Expand Up @@ -155,7 +154,7 @@ func (e *Enqueuer) EnqueueUniqueInByKey(jobName string, secondsFromNow int64, ar

func (e *Enqueuer) addToKnownJobs(conn redis.Conn, jobName string) error {
needSadd := true
now := time.Now().Unix()
now := nowEpochSeconds()

e.mtx.RLock()
t, ok := e.knownJobs[jobName]
Expand Down

0 comments on commit d4a3e64

Please sign in to comment.