diff --git a/sql.go b/sql.go index 24b25fb..61f6d44 100644 --- a/sql.go +++ b/sql.go @@ -1014,10 +1014,13 @@ func cleanupJobData() { log.Printf("cleanupJobData : JobID : %d\n", jobID) err = doneStmt.QueryRow(jobID).Scan(&isDone) logOnError(err, "cleanupJobData : scan doneStmt") - if err.Error() == `sql: no rows in result set` { - } else if err != nil { - return + if err != nil { + if err.Error() == `sql: no rows in result set` { + + } else { + return + } } else { log.Printf("cleanupJobData : isDone : %d\n", isDone) }