lzq 2025-11-13 17:35:35 +08:00
parent be6808af55
commit 1cfecce36e
1 changed files with 2 additions and 3 deletions

View File

@ -575,7 +575,7 @@ public class TruckLocationTrackService extends ServiceImpl<TruckLocationTrackMap
List<TruckLocationTrackEntity> records = resultPage.getRecords();
if (records.isEmpty()) {
if (errCount >= 200) {
if (errCount >= 300) {
log.error("暂无实时数据, 订单ID: {}, 时间: {}", orderId, startTime);
Websocket.publish(new WsMsg()
.setEvent("down/truck_location_track/realtime")
@ -585,11 +585,10 @@ public class TruckLocationTrackService extends ServiceImpl<TruckLocationTrackMap
return;
}
errCount++;
if (!ThreadUtil.sleep(300)) {
if (!ThreadUtil.sleep(1000)) {
log.info("任务被取消");
return;
} else {
startTime = LocalDateTime.now();
continue;
}
}