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 17, 2020
1 parent c3baff8 commit 7af867a
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 @@ -153,7 +152,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 7af867a

Please sign in to comment.