Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream_edge_ce/feature/edge-json-conv…
Browse files Browse the repository at this point in the history
…erter-impl' into feature/edge-json-converter-impl
  • Loading branch information
AndriiLandiak committed Nov 17, 2023
2 parents 6d5bae5 + edd7166 commit 68973d3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ public void performInstall() {
dataUpdateService.updateData("3.6.0");
case "3.6.1":
log.info("Upgrading ThingsBoard from version 3.6.1 to 3.6.2 ...");
//TODO DON'T FORGET to update switch statement in the CacheCleanupService if you need to clear the cache
databaseEntitiesUpgradeService.upgradeDatabase("3.6.1");

// reset full sync required - to upload the latest widgets from cloud
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
import org.thingsboard.server.gen.edge.v1.DeviceRpcCallMsg;
import org.thingsboard.server.gen.edge.v1.DeviceUpdateMsg;
import org.thingsboard.server.gen.edge.v1.DownlinkMsg;
import org.thingsboard.server.gen.edge.v1.EdgeVersion;
import org.thingsboard.server.gen.edge.v1.EntityDataProto;
import org.thingsboard.server.gen.edge.v1.EntityGroupUpdateMsg;
import org.thingsboard.server.gen.edge.v1.EntityViewUpdateMsg;
Expand Down Expand Up @@ -224,7 +223,6 @@ public ListenableFuture<List<Void>> processDownlinkMsg(TenantId tenantId,
log.debug("[{}] Starting process DownlinkMsg. downlinkMsgId [{}],",
tenantId, downlinkMsg.getDownlinkMsgId());
log.trace("DownlinkMsg Body {}", downlinkMsg);
EdgeVersion edgeVersion = EdgeVersion.V_3_6_2;
if (downlinkMsg.hasSyncCompletedMsg()) {
result.add(updateSyncRequiredState(tenantId, this.customerId, currentEdgeSettings, queueStartTs));
}
Expand Down Expand Up @@ -258,7 +256,7 @@ public ListenableFuture<List<Void>> processDownlinkMsg(TenantId tenantId,
}
if (downlinkMsg.getDeviceCredentialsUpdateMsgCount() > 0) {
for (DeviceCredentialsUpdateMsg deviceCredentialsUpdateMsg : downlinkMsg.getDeviceCredentialsUpdateMsgList()) {
result.add(deviceProcessor.processDeviceCredentialsMsgFromCloud(tenantId, deviceCredentialsUpdateMsg, edgeVersion));
result.add(deviceProcessor.processDeviceCredentialsMsgFromCloud(tenantId, deviceCredentialsUpdateMsg));
}
}
if (downlinkMsg.getAssetProfileUpdateMsgCount() > 0) {
Expand Down Expand Up @@ -293,7 +291,7 @@ public ListenableFuture<List<Void>> processDownlinkMsg(TenantId tenantId,
}
if (downlinkMsg.getAlarmUpdateMsgCount() > 0) {
for (AlarmUpdateMsg alarmUpdateMsg : downlinkMsg.getAlarmUpdateMsgList()) {
result.add(alarmProcessor.processAlarmMsgFromCloud(tenantId, alarmUpdateMsg, edgeVersion));
result.add(alarmProcessor.processAlarmMsgFromCloud(tenantId, alarmUpdateMsg));
}
}
if (downlinkMsg.getCustomerUpdateMsgCount() > 0) {
Expand All @@ -311,7 +309,7 @@ public ListenableFuture<List<Void>> processDownlinkMsg(TenantId tenantId,
}
if (downlinkMsg.getRelationUpdateMsgCount() > 0) {
for (RelationUpdateMsg relationUpdateMsg : downlinkMsg.getRelationUpdateMsgList()) {
result.add(relationProcessor.processRelationMsgFromCloud(tenantId, relationUpdateMsg, edgeVersion));
result.add(relationProcessor.processRelationMsgFromCloud(tenantId, relationUpdateMsg));
}
}
if (downlinkMsg.getWidgetsBundleUpdateMsgCount() > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
@Slf4j
public class AlarmCloudProcessor extends BaseAlarmProcessor {

public ListenableFuture<Void> processAlarmMsgFromCloud(TenantId tenantId, AlarmUpdateMsg alarmUpdateMsg, EdgeVersion edgeVersion) {
public ListenableFuture<Void> processAlarmMsgFromCloud(TenantId tenantId, AlarmUpdateMsg alarmUpdateMsg) {
try {
cloudSynchronizationManager.getSync().set(true);
return processAlarmMsg(tenantId, alarmUpdateMsg, edgeVersion);
return processAlarmMsg(tenantId, alarmUpdateMsg, false);
} finally {
cloudSynchronizationManager.getSync().remove();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public ListenableFuture<Void> processCustomerMsgFromCloud(TenantId tenantId, Cus
case ENTITY_DELETED_RPC_MESSAGE:
Customer customerById = customerService.findCustomerById(tenantId, customerId);
if (customerById != null) {
customerService.deleteCustomer(tenantId, customerId);
customerService.deleteCustomer(tenantId, customerId);
}
return Futures.immediateFuture(null);
case UNRECOGNIZED:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
import org.thingsboard.server.gen.edge.v1.UplinkMsg;
import org.thingsboard.server.gen.transport.TransportProtos;
import org.thingsboard.server.service.edge.rpc.processor.device.BaseDeviceProcessor;
import org.thingsboard.server.service.edge.rpc.utils.EdgeVersionUtils;
import org.thingsboard.server.service.security.model.SecurityUser;

import java.util.Optional;
Expand Down Expand Up @@ -141,11 +142,11 @@ private void pushDeviceEventToRuleEngine(TenantId tenantId, Device device, TbMsg
}
}

public ListenableFuture<Void> processDeviceCredentialsMsgFromCloud(TenantId tenantId, DeviceCredentialsUpdateMsg deviceCredentialsUpdateMsg, EdgeVersion edgeVersion) {
public ListenableFuture<Void> processDeviceCredentialsMsgFromCloud(TenantId tenantId, DeviceCredentialsUpdateMsg deviceCredentialsUpdateMsg) {
try {
cloudSynchronizationManager.getSync().set(true);

updateDeviceCredentials(tenantId, deviceCredentialsUpdateMsg, edgeVersion);
updateDeviceCredentials(tenantId, deviceCredentialsUpdateMsg, false);
} finally {
cloudSynchronizationManager.getSync().remove();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@
@Slf4j
public class RelationCloudProcessor extends BaseRelationProcessor {

public ListenableFuture<Void> processRelationMsgFromCloud(TenantId tenantId, RelationUpdateMsg relationUpdateMsg, EdgeVersion edgeVersion) {
public ListenableFuture<Void> processRelationMsgFromCloud(TenantId tenantId, RelationUpdateMsg relationUpdateMsg) {
try {
cloudSynchronizationManager.getSync().set(true);

return processRelationMsg(tenantId, relationUpdateMsg, edgeVersion);
return processRelationMsg(tenantId, relationUpdateMsg, false);
} finally {
cloudSynchronizationManager.getSync().remove();
}
Expand Down

0 comments on commit 68973d3

Please sign in to comment.