Signed-off-by: wozulong <>
This commit is contained in:
wozulong 2024-09-10 17:38:30 +08:00
parent 8d83630d85
commit a9e3555cac

View File

@ -260,11 +260,11 @@ func DeleteOldLog(ctx context.Context, targetTimestamp int64, limit int) (int64,
return total, result.Error
}
if 0 == result.RowsAffected {
total += result.RowsAffected
if result.RowsAffected < int64(limit) {
break
}
total += result.RowsAffected
}
return total, nil