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

pull/10/head
xuxueli 5 years ago
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…
Cancel
Save