fix
This commit is contained in:
parent
4f13347b79
commit
9640058f1c
21
sql.go
21
sql.go
@ -1040,15 +1040,20 @@ 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 {
|
||||||
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)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user