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