mirror of
https://github.com/acaloiaro/neoq
synced 2026-07-21 18:29:08 +00:00
Use time.Until instead of t.Sub(time.Now())
This commit is contained in:
parent
fc011c9c84
commit
84826b5f0a
1 changed files with 1 additions and 1 deletions
2
neoq.go
2
neoq.go
|
|
@ -653,7 +653,7 @@ func (w pgWorker) updateJob(ctx context.Context, jobErr error) (err error) {
|
|||
_, err = tx.Exec(ctx, qstr, time.Now(), errMsg, status, job.ID)
|
||||
}
|
||||
|
||||
if err == nil && runAfter.Sub(time.Now()) > 0 {
|
||||
if err == nil && time.Until(runAfter) > 0 {
|
||||
w.mu.Lock()
|
||||
w.futureJobs[job.ID] = runAfter
|
||||
w.mu.Unlock()
|
||||
|
|
|
|||
Loading…
Reference in a new issue