This commit is contained in:
shoopea 2019-05-11 13:00:20 +08:00
parent dab1ff7e5b
commit 9036623075

3
sql.go
View File

@ -201,6 +201,7 @@ func initDB() {
,schedule DATETIME NOT NULL ,schedule DATETIME NOT NULL
,is_done TINYINT NOT NULL ,is_done TINYINT NOT NULL
,in_work TINYINT NOT NULL ,in_work TINYINT NOT NULL
,inserted TIMESTAMP
,pulled TIMESTAMP ,pulled TIMESTAMP
,started TIMESTAMP ,started TIMESTAMP
,ended TIMESTAMP ,ended TIMESTAMP
@ -1356,7 +1357,7 @@ func createJob(job_type_id int32, priority int32, schedule time.Time, payload []
return err return err
} }
stmt, err = db.Prepare(`INSERT INTO obj_job (obj_id, priority, status, schedule, is_done, in_work, inserted, pulled, started, end, payload) stmt, err = db.Prepare(`INSERT INTO obj_job (obj_id, priority, status, schedule, is_done, in_work, inserted, pulled, started, ended, payload)
VALUES (?, ?, ?, ?, 0, 0, ?, NULL, NULL, NULL, ?);`) VALUES (?, ?, ?, ?, 0, 0, ?, NULL, NULL, NULL, ?);`)
logOnError(err, "createJob : prepare insert obj_job") logOnError(err, "createJob : prepare insert obj_job")
if err != nil { if err != nil {