Commit ab277a32 authored by 赵啸非's avatar 赵啸非

优化窗口业务查询

parent 14ea80a5
......@@ -10,11 +10,12 @@ import com.mortals.xhx.module.page.service.PageRouteService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import static com.mortals.xhx.common.key.RedisKey.KEY_BURY_POINT_CACHE;
//@Component
@Component
@Slf4j
public class ComsumerBurySaveService implements IApplicationStartedService {
......@@ -36,14 +37,17 @@ public class ComsumerBurySaveService implements IApplicationStartedService {
Thread sendThread = new Thread(new Runnable() {
@Override
public void run() {
int waitTime = 1;
int waitTime = 10;
while (!stopped) {
try {
BuryPointPdu pdu = cacheService.lpop(KEY_BURY_POINT_CACHE, BuryPointPdu.class);
if(!ObjectUtils.isEmpty(pdu)){
pageAccessService.saveByPdu(pdu);
pageAccessDepthService.saveByPdu(pdu);
pageEventService.saveByPdu(pdu);
pageRouteService.saveByPdu(pdu);
}
try {
Thread.sleep(waitTime);
} catch (InterruptedException e2) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment