Authored by LUOXC

fixbug

... ... @@ -31,22 +31,22 @@ public class FailTradeBillsScanner implements Runnable {
@Override
public void run() {
try {
// Need to catch the exception to keep the event scanner running.
pollEvents();
} catch (Exception ex) {
log.warn("Got the exception {} when poll.", ex.getMessage(), ex);
}
}
private void pollEvents() {
scheduler.scheduleWithFixedDelay(
() -> recoverFailTradeBills(),
() -> pollEvents(),
0,
pollingInterval,
MILLISECONDS);
}
private void pollEvents() {
try {
recoverFailTradeBills();
} catch (Exception ex) {
// Need to catch the exception to keep the event scanner running.
log.warn("Got the exception {} when poll.", ex.getMessage(), ex);
}
}
private void recoverFailTradeBills() {
List<TradeBills> failTradeBillsList = tradeBillsMapper.selectByFailTradeBills(fromCreateTime, fromTradeBillsId, 1);
if (CollectionUtils.isEmpty(failTradeBillsList)) {
... ...