diff --git a/sql.go b/sql.go index 9df352f..d712b12 100644 --- a/sql.go +++ b/sql.go @@ -962,9 +962,10 @@ func getSQLListID64(q string) []int64 { func cleanupJobData() { var ( - jobID int64 - count int64 - isDone int + jobID int64 + count int64 + countDeleted int64 + isDone int ) jobStmt, err := db.Prepare(`SELECT o.id FROM obj o WHERE o.obj_type_id = ` + strconv.FormatInt(cacheObjType[`job`], 10) + `;`) @@ -1023,6 +1024,7 @@ func cleanupJobData() { } del, err := delObj.RowsAffected() logOnError(err, "cleanupJobData : rows delObj") + countDeleted += del if err != nil { return } @@ -1038,7 +1040,7 @@ func cleanupJobData() { count += 1 } - log.Printf("cleanupJobData : %d jobs\n", count) + log.Printf("cleanupJobData : %d jobs scanned, %d obj deleted\n", count, countDeleted) /* for _, id := range ids {