Browse Source

优化全量设备状态更新定时任务调用超时,将全量设备状态更新接口设置为异步执行

james 1 week ago
parent
commit
5580546279

+ 2 - 1
service-iot/service-iot-biz/src/main/java/com/usky/iot/service/impl/DmpDeviceInfoServiceImpl.java

@@ -46,6 +46,7 @@ import com.usky.transfer.RemoteTransferService;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.poi.ss.usermodel.Workbook;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
 import org.springframework.web.multipart.MultipartFile;
@@ -421,7 +422,7 @@ public class DmpDeviceInfoServiceImpl extends AbstractCrudService<DmpDeviceInfoM
         return null != one && !Objects.equals(one.getId(), id);
     }
 
-    @Override
+    @Async
     public void deviceStatus(){
         log.info("定时同步设备状态数据 start");
         LastInnerQueryVO queryVO = new LastInnerQueryVO();