diff --git a/pkg/jobqueue/dbjobqueue/dbjobqueue.go b/pkg/jobqueue/dbjobqueue/dbjobqueue.go index 970c41a4c..8b54a1a9b 100644 --- a/pkg/jobqueue/dbjobqueue/dbjobqueue.go +++ b/pkg/jobqueue/dbjobqueue/dbjobqueue.go @@ -28,10 +28,10 @@ const ( sqlListen = `LISTEN jobs` sqlUnlisten = `UNLISTEN jobs` - sqlEnqueue = `INSERT INTO jobs(id, type, args, queued_at, channel) VALUES ($1, $2, $3, NOW(), $4)` + sqlEnqueue = `INSERT INTO jobs(id, type, args, queued_at, channel) VALUES ($1, $2, $3, statement_timestamp(), $4)` sqlDequeue = ` UPDATE jobs - SET token = $1, started_at = now() + SET token = $1, started_at = statement_timestamp() WHERE id = ( SELECT id FROM ready_jobs @@ -45,7 +45,7 @@ const ( sqlDequeueByID = ` UPDATE jobs - SET token = $1, started_at = now() + SET token = $1, started_at = statement_timestamp() WHERE id = ( SELECT id FROM ready_jobs