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

21
sql.go
View File

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