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

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

@ -160,7 +160,9 @@ public class JobScheduleHelper {
try {
conn.commit();
} catch (SQLException e) {
e.printStackTrace();
if (!scheduleThreadToStop) {
logger.error(e.getMessage(), e);
}
}
// close PreparedStatement
@ -168,6 +170,9 @@ public class JobScheduleHelper {
try {
preparedStatement.close();
} catch (SQLException ignore) {
if (!scheduleThreadToStop) {
logger.error(ignore.getMessage(), ignore);
}
}
}
}

Loading…
Cancel
Save