调度线程优化,避免异常无法commit导致锁表;

master
xuxueli 5 years ago
parent d836e30924
commit 04e16245a4
  1. 11
      xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobScheduleHelper.java

@ -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…
Cancel
Save