Browse Source

fixed unnecessary device actor init on rule-engine

pull/9992/head
YevhenBondarenko 2 years ago
parent
commit
bdc2fe4ee6
  1. 2
      application/src/main/java/org/thingsboard/server/actors/tenant/TenantActor.java

2
application/src/main/java/org/thingsboard/server/actors/tenant/TenantActor.java

@ -261,7 +261,7 @@ public class TenantActor extends RuleChainManagerActor {
edgeRpcService.updateEdge(tenantId, edge);
}
}
if (msg.getEntityId().getEntityType() == EntityType.DEVICE && ComponentLifecycleEvent.DELETED == msg.getEvent()) {
if (msg.getEntityId().getEntityType() == EntityType.DEVICE && ComponentLifecycleEvent.DELETED == msg.getEvent() && isMyPartition(msg.getEntityId())) {
DeviceId deviceId = (DeviceId) msg.getEntityId();
onToDeviceActorMsg(new DeviceDeleteMsg(tenantId, deviceId), true);
deletedDevices.add(deviceId);

Loading…
Cancel
Save