This commit is contained in:
2026-08-03 14:46:36 +08:00
parent 6be6d5d333
commit 42eae10df6
31 changed files with 170 additions and 440 deletions

View File

@@ -7,6 +7,7 @@ import java.util.concurrent.Executor;
import javax.annotation.Resource;
import com.maibu.service.impl.IotDeviceCommonService;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
@@ -49,6 +50,9 @@ public class InitThread implements ApplicationRunner {
@Resource(name = FastBeeConstant.TASK.DEVICE_ERROR_MONITOR)
private Executor deviceErrorMonitorExecutor;
@Resource(name = FastBeeConstant.TASK.COMMON_DEVICE_MONITOR)
private Executor commonDeviceMonitorExecutor;
@Resource(name = FastBeeConstant.TASK.DEVICE_TASK_HANDLER)
private Executor deviceTaskHandlerExecutor;
@@ -76,6 +80,9 @@ public class InitThread implements ApplicationRunner {
@Autowired
private AlarmOrderConfigMapper alarmOrderConfigMapper;
@Autowired
private IotDeviceCommonService commonService;
@Value("${influxdb.url}")
private String influxDBUrl;
@@ -138,6 +145,9 @@ public class InitThread implements ApplicationRunner {
throw new RuntimeException(e);
}
});
commonDeviceMonitorExecutor.execute(() -> {
commonService.commonDeviceMonitor();
});
}
/**