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