This commit is contained in:
shoopea 2019-05-10 17:24:50 +08:00
parent e7a947bbd3
commit cd1fb8b045

5
sql.go
View File

@ -5,6 +5,7 @@ import (
"log"
"regexp"
"strconv"
"time"
)
func initDB() {
@ -1380,7 +1381,7 @@ func loadCurrentJobs() ([]Job, error) {
tx, err := db.Begin()
logOnError(err, "loadCurrentJobs : begin transaction")
if err != nil {
return 0, err
return jobs, err
}
defer tx.Rollback()
@ -1396,7 +1397,7 @@ func loadCurrentJobs() ([]Job, error) {
job := Job{
ID64: objId,
JobTypeID: jobTypeId,
Payload: &payload,
Payload: payload,
}
jobs = append(jobs, job)
}