test
This commit is contained in:
parent
82365181aa
commit
e062d2b7fd
4
job.go
4
job.go
@ -115,12 +115,12 @@ func loadCurrentJobs() ([]Job, error) {
|
|||||||
stmt, err := db.Prepare("SELECT o.id, o.obj_sub_type_id, j.status, j.user_id, j.payload FROM obj_job j, obj o WHERE j.obj_id = o.id AND j.is_done = 0 AND j.in_work = 1 AND j.pulled = ? ORDER BY j.priority ASC, j.obj_id ASC;")
|
stmt, err := db.Prepare("SELECT o.id, o.obj_sub_type_id, j.status, j.user_id, j.payload FROM obj_job j, obj o WHERE j.obj_id = o.id AND j.is_done = 0 AND j.in_work = 1 AND j.pulled = ? ORDER BY j.priority ASC, j.obj_id ASC;")
|
||||||
logOnError(err, "loadCurrentJobs : prepare select statement")
|
logOnError(err, "loadCurrentJobs : prepare select statement")
|
||||||
|
|
||||||
rows, err := stmt.Query()
|
rows, err := stmt.Query(t)
|
||||||
// rows, err := stmt.Query(time.Now())
|
// rows, err := stmt.Query(time.Now())
|
||||||
logOnError(err, "loadCurrentJobs : query select statement")
|
logOnError(err, "loadCurrentJobs : query select statement")
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
err = rows.Scan(&objId, &jobTypeId, &status, &userID64, &payload, &t)
|
err = rows.Scan(&objId, &jobTypeId, &status, &userID64, &payload)
|
||||||
logOnError(err, "loadCurrentJobs : scan query rows")
|
logOnError(err, "loadCurrentJobs : scan query rows")
|
||||||
job := Job{
|
job := Job{
|
||||||
ID64: objId,
|
ID64: objId,
|
||||||
|
Loading…
Reference in New Issue
Block a user