fix: 定时任务逻辑修改,回查不管是否成功,都返回true。
This commit is contained in:
@@ -2698,7 +2698,7 @@ public class IotController extends BaseController {
|
||||
Thread.sleep(1000L);
|
||||
} catch (InterruptedException ie) {
|
||||
Thread.currentThread().interrupt();
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
try {
|
||||
Map<String, Object> queryResult = iotCloudService.getDeviceProperties(device.getIotId());
|
||||
@@ -2741,7 +2741,9 @@ public class IotController extends BaseController {
|
||||
if (actualIsValid == expectedIsValid) {
|
||||
log.info("[TimerCtrl] 回查确认设备已收到定时控制设置, iotId={}, key={}, isValid={}",
|
||||
device.getIotId(), propertyKey, actualIsValid);
|
||||
return true;
|
||||
} else {
|
||||
log.warn("[TimerCtrl] 回查属性未匹配预期, retry={}, expectedIsValid={}, actualIsValid={}",
|
||||
retry, expectedIsValid, actualIsValid);
|
||||
}
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
@@ -2752,16 +2754,14 @@ public class IotController extends BaseController {
|
||||
}
|
||||
if (!matched) {
|
||||
log.warn("[TimerCtrl] 回查未找到属性 key={}, retry={}", propertyKey, retry);
|
||||
} else {
|
||||
log.warn("[TimerCtrl] 回查属性未匹配预期, retry={}, expectedIsValid={}", retry, expectedIsValid);
|
||||
}
|
||||
break;
|
||||
} catch (Exception qe) {
|
||||
log.warn("[TimerCtrl] 回查查询异常, retry={}, err={}", retry, qe.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
log.warn("[TimerCtrl] 回查重试完毕仍未确认设备收到, iotId={}, key={}", device.getIotId(), propertyKey);
|
||||
return false;
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
log.error("设置定时控制属性失败: {}", e.getMessage(), e);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user