Browse Source

状态值新增过期时间

master
hupenghui@qniao.cn 3 years ago
parent
commit
5de0050b43
2 changed files with 3 additions and 1 deletions
  1. 2
      .gitignore
  2. 2
      iot-device-power-on-and-off-data-job/src/main/java/com/qniao/iot/device/power/IotDevicePowerOnAndOffDataJob.java

2
.gitignore

@ -37,3 +37,5 @@ buildNumber.properties
.mvn/wrapper/maven-wrapper.jar
/.idea
*.iml

2
iot-device-power-on-and-off-data-job/src/main/java/com/qniao/iot/device/power/IotDevicePowerOnAndOffDataJob.java

@ -147,7 +147,7 @@ public class IotDevicePowerOnAndOffDataJob {
ValueStateDescriptor<IotDevicePowerOnAndOffDataEvent> powerOnAndOffDataEventValue = new ValueStateDescriptor<>("powerOnAndOffDataEventValue",
TypeInformation.of(IotDevicePowerOnAndOffDataEvent.class));
// 设置状态值的过期时间为了解决机器关机没有消息的情况
// 设置状态值的过期时间为了解决手动修改数据没有同步的问题
powerOnAndOffDataEventValue.enableTimeToLive(ttlConfig);
// 必须在 open 生命周期初始化

Loading…
Cancel
Save