调度线程优化,避免异常无法commit导致锁表;
This commit is contained in:
parent
d836e30924
commit
04e16245a4
|
@ -149,12 +149,21 @@ public class JobScheduleHelper {
|
|||
|
||||
// tx stop
|
||||
|
||||
conn.commit();
|
||||
|
||||
} catch (Exception e) {
|
||||
if (!scheduleThreadToStop) {
|
||||
logger.error(">>>>>>>>>>> xxl-job, JobScheduleHelper#scheduleThread error:{}", e);
|
||||
}
|
||||
} finally {
|
||||
|
||||
// commit
|
||||
try {
|
||||
conn.commit();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
// close PreparedStatement
|
||||
if (null != preparedStatement) {
|
||||
try {
|
||||
preparedStatement.close();
|
||||
|
|
Loading…
Reference in New Issue