This commit is contained in:
shoopea 2019-05-10 17:32:08 +08:00
parent a20a79059a
commit e264120b04

2
sql.go
View File

@ -1385,7 +1385,7 @@ func loadCurrentJobs() ([]Job, error) {
}
defer tx.Rollback()
stmt, err := tx.Prepare("SELECT o.id, o.obj_sub_type_id, j.payload FROM obj_job j, obj o WHERE j.obj_id = o.id AND j.status = ? AND j.schedule <= ? ORDER BY j.prio ASC LIMIT ? FOR UPDATE;")
stmt, err := tx.Prepare("SELECT o.id, o.obj_sub_type_id, j.payload FROM obj_job j, obj o WHERE j.obj_id = o.id AND j.status = ? AND j.schedule <= ? ORDER BY j.priority ASC LIMIT ? FOR UPDATE;")
logOnError(err, "loadCurrentJobs : prepare select statement")
rows, err := stmt.Query(objJobStatusNew, time.Now(), SQLJobSliceSize)