This commit is contained in:
shoopea 2020-10-20 11:45:02 +02:00
parent 4f13347b79
commit 9640058f1c

5
sql.go
View File

@ -1040,8 +1040,12 @@ func cleanupJobData() {
delJob, err := delJobStmt.Exec(jobID) delJob, err := delJobStmt.Exec(jobID)
logOnError(err, "cleanupJobData : exec delJobStmt") logOnError(err, "cleanupJobData : exec delJobStmt")
if err != nil { if err != nil {
if err.Error() == `Error 1213: Deadlock found when trying to get lock; try restarting transaction` {
} else {
return return
} }
} else {
del, err := delJob.RowsAffected() del, err := delJob.RowsAffected()
logOnError(err, "cleanupJobData : rows delJob") logOnError(err, "cleanupJobData : rows delJob")
if err != nil { if err != nil {
@ -1051,6 +1055,7 @@ func cleanupJobData() {
log.Printf("cleanupJobData : delJob : %d\n", del) log.Printf("cleanupJobData : delJob : %d\n", del)
} }
} }
}
count += 1 count += 1
} }