fix
This commit is contained in:
parent
e0e8c2a8ae
commit
f17a44d2e8
7
sql.go
7
sql.go
@ -962,15 +962,14 @@ func getSQLListID64(q string) []int64 {
|
||||
|
||||
func cleanupJobData() {
|
||||
var jobID int64
|
||||
jobStmt, err := db.Prepare(`SELECT o.id FROM obj o WHERE o.obj_type_id = ?;`)
|
||||
jobStmt, err := db.Prepare(`SELECT o.id FROM obj o WHERE o.obj_type_id = ` + strconv.FormatInt(cacheObjType[`job`], 10) + `;`)
|
||||
logOnError(err, "cleanupJobData : prepare jobStmt")
|
||||
if err != nil {
|
||||
jobStmt.Close()
|
||||
return
|
||||
}
|
||||
|
||||
jobID = cacheObjType[`job`]
|
||||
jobs, err := jobStmt.Query(&jobID)
|
||||
jobs, err := jobStmt.Query()
|
||||
logOnError(err, "cleanupJobData : query jobStmt")
|
||||
if err != nil {
|
||||
jobStmt.Close()
|
||||
@ -978,7 +977,7 @@ func cleanupJobData() {
|
||||
}
|
||||
|
||||
for jobs.Next() {
|
||||
err = rows.Scan(&jobID)
|
||||
err = jobs.Scan(&jobID)
|
||||
logOnError(err, "cleanupJobData : scan jobStmt")
|
||||
if err != nil {
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user