Merge pull request #10 from edgebox-iot/fix-result-null-conversion
Fix query panic on GetNextTask()pull/14/head
commit
c9f97d42bf
|
@ -70,7 +70,7 @@ func GetNextTask() Task {
|
||||||
panic(err.Error())
|
panic(err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
results, err := db.Query("SELECT * FROM task WHERE status = 0 ORDER BY created ASC LIMIT 1;")
|
results, err := db.Query("SELECT id, task, args, status, result, created, updated FROM task WHERE status = 0 ORDER BY created ASC LIMIT 1;")
|
||||||
|
|
||||||
// if there is an error inserting, handle it
|
// if there is an error inserting, handle it
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue