refactored renamed useTelemetry to persistToTelemetry
This commit is contained in:
parent
bc08e6204f
commit
5ee58710a5
@ -125,9 +125,9 @@ public class DefaultDeviceStateService implements DeviceStateService {
|
|||||||
@Getter
|
@Getter
|
||||||
private long defaultStateCheckIntervalInSec;
|
private long defaultStateCheckIntervalInSec;
|
||||||
|
|
||||||
@Value("${state.useTelemetry}")
|
@Value("${state.persistToTelemetry}")
|
||||||
@Getter
|
@Getter
|
||||||
private boolean useTelemetry;
|
private boolean persistToTelemetry;
|
||||||
|
|
||||||
// TODO in v2.1
|
// TODO in v2.1
|
||||||
// @Value("${state.defaultStatePersistenceIntervalInSec}")
|
// @Value("${state.defaultStatePersistenceIntervalInSec}")
|
||||||
@ -473,7 +473,7 @@ public class DefaultDeviceStateService implements DeviceStateService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void save(DeviceId deviceId, String key, long value) {
|
private void save(DeviceId deviceId, String key, long value) {
|
||||||
if (useTelemetry) {
|
if (persistToTelemetry) {
|
||||||
tsSubService.saveAndNotify(
|
tsSubService.saveAndNotify(
|
||||||
TenantId.SYS_TENANT_ID, deviceId,
|
TenantId.SYS_TENANT_ID, deviceId,
|
||||||
Collections.singletonList(new BasicTsKvEntry(System.currentTimeMillis(), new LongDataEntry(key, value))),
|
Collections.singletonList(new BasicTsKvEntry(System.currentTimeMillis(), new LongDataEntry(key, value))),
|
||||||
@ -484,7 +484,7 @@ public class DefaultDeviceStateService implements DeviceStateService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void save(DeviceId deviceId, String key, boolean value) {
|
private void save(DeviceId deviceId, String key, boolean value) {
|
||||||
if (useTelemetry) {
|
if (persistToTelemetry) {
|
||||||
tsSubService.saveAndNotify(
|
tsSubService.saveAndNotify(
|
||||||
TenantId.SYS_TENANT_ID, deviceId,
|
TenantId.SYS_TENANT_ID, deviceId,
|
||||||
Collections.singletonList(new BasicTsKvEntry(System.currentTimeMillis(), new BooleanDataEntry(key, value))),
|
Collections.singletonList(new BasicTsKvEntry(System.currentTimeMillis(), new BooleanDataEntry(key, value))),
|
||||||
|
|||||||
@ -403,7 +403,7 @@ audit-log:
|
|||||||
state:
|
state:
|
||||||
defaultInactivityTimeoutInSec: "${DEFAULT_INACTIVITY_TIMEOUT:10}"
|
defaultInactivityTimeoutInSec: "${DEFAULT_INACTIVITY_TIMEOUT:10}"
|
||||||
defaultStateCheckIntervalInSec: "${DEFAULT_STATE_CHECK_INTERVAL:10}"
|
defaultStateCheckIntervalInSec: "${DEFAULT_STATE_CHECK_INTERVAL:10}"
|
||||||
useTelemetry: "${USE_TELEMETRY:true}"
|
persistToTelemetry: "${PERSIST_STATE_TO_TELEMETRY:false}"
|
||||||
|
|
||||||
kafka:
|
kafka:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user