This commit is contained in:
shoopea 2019-05-10 22:03:47 +08:00
parent 514ff9b9b1
commit 61b6dccca1

4
sql.go
View File

@ -1333,7 +1333,7 @@ func createJob(job_type_id int32, priority int32, schedule time.Time, payload []
}
defer stmt.Close()
res, err = stmt.Exec(objTypeJob, job_type_id)
res, err := stmt.Exec(objTypeJob, job_type_id)
logOnError(err, "createJob : insert obj")
if err != nil {
return err
@ -1345,7 +1345,7 @@ func createJob(job_type_id int32, priority int32, schedule time.Time, payload []
return err
}
stmt, err := db.Prepare(`INSERT INTO obj_job (obj_id, priority, status, schedule, start, end, payload)
stmt, err = db.Prepare(`INSERT INTO obj_job (obj_id, priority, status, schedule, start, end, payload)
VALUES (?, ?, ?, ?, NULL, NULL, ?);`)
logOnError(err, "createJob : prepare insert obj_job")
if err != nil {