This commit is contained in:
shoopea 2020-10-11 12:58:32 +02:00
parent f17a44d2e8
commit ac4bf679ec

9
sql.go
View File

@ -961,7 +961,11 @@ func getSQLListID64(q string) []int64 {
}
func cleanupJobData() {
var jobID int64
var (
jobID int64
count int64
)
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 {
@ -983,8 +987,11 @@ func cleanupJobData() {
return
}
log.Printf("cleanupJobData : JobID : %d\n", jobID)
count += 1
}
log.Printf("cleanupJobData : %d jobs\n", count)
/*
for _, id := range ids {
job, err := db.Query(`SELECT oj.is_done FROM obj_job oj WHERE oj.obj_id = ?;`)