优化通道刷新的时接收下级消息的效率

This commit is contained in:
648540858
2024-10-22 17:41:42 +08:00
parent 53f2f36f37
commit d2fc2df77b
8 changed files with 111 additions and 96 deletions

View File

@@ -99,7 +99,7 @@ public class MobilePositionServiceImpl implements IMobilePositionService {
channelMapper.updateStreamGPS(gpsMsgInfoList);
}
@Scheduled(fixedRate = 1000)
@Scheduled(fixedDelay = 1000)
@Transactional
public void executeTaskQueue() {
int countLimit = 3000;

View File

@@ -65,7 +65,7 @@ public class RedisGpsMsgListener implements MessageListener {
/**
* 定时将经纬度更新到数据库
*/
@Scheduled(fixedRate = 2 * 1000) //每2秒执行一次
@Scheduled(fixedDelay = 2 * 1000) //每2秒执行一次
public void execute(){
List<GPSMsgInfo> gpsMsgInfoList = redisCatchStorage.getAllGpsMsgInfo();
if (!gpsMsgInfoList.isEmpty()) {