This commit is contained in:
shoopea 2019-06-11 12:00:43 +08:00
parent 2cb2fd3373
commit 48cef9ba94

2
job.go
View File

@ -107,7 +107,7 @@ func loadCurrentJobs() ([]Job, error) {
jobs []Job jobs []Job
) )
t := time.Now() t := time.Now().UTC()
r := RndInt64() r := RndInt64()
_, err := db.Exec("UPDATE obj_job j SET j.pulled = ?, j.in_work = 1, j.seq_nr = ? WHERE j.is_done = 0 AND j.in_work = 0 AND j.schedule <= ? ORDER BY j.priority ASC, j.obj_id ASC LIMIT ?;", t, r, t, SQLJobSliceSize) _, err := db.Exec("UPDATE obj_job j SET j.pulled = ?, j.in_work = 1, j.seq_nr = ? WHERE j.is_done = 0 AND j.in_work = 0 AND j.schedule <= ? ORDER BY j.priority ASC, j.obj_id ASC LIMIT ?;", t, r, t, SQLJobSliceSize)