调度线程优化,避免异常无法commit导致锁表;
This commit is contained in:
parent
04e16245a4
commit
ebc5618e07
|
@ -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…
Reference in New Issue