Browse Source

[feat]

1、修改无人机相关配置
master
杨威 3 months ago
parent
commit
61ac343f2c
  1. 4
      dk-modules/sample/src/main/java/org/dromara/sample/component/GlobalScheduleService.java

4
dk-modules/sample/src/main/java/org/dromara/sample/component/GlobalScheduleService.java

@ -42,7 +42,6 @@ public class GlobalScheduleService {
@Scheduled(initialDelay = 10, fixedRate = 30, timeUnit = TimeUnit.SECONDS)
private void deviceStatusListen() {
int start = RedisConst.DEVICE_ONLINE_PREFIX.length();
redisOpsUtils.getAllKeys(RedisConst.DEVICE_ONLINE_PREFIX + "*").forEach(key -> {
long expire = redisOpsUtils.getExpire(key);
if (expire <= 30) {
@ -50,6 +49,9 @@ public class GlobalScheduleService {
if (null == device) {
return;
}
if(device.getWorkspaceId().isEmpty()){
return;
}
if (DeviceDomainEnum.DRONE == device.getDomain()) {
deviceService.subDeviceOffline(key.substring(start));
} else {

Loading…
Cancel
Save