|
|
|
@ -334,7 +334,7 @@ public class DefaultTbLocalSubscriptionService implements TbLocalSubscriptionSer |
|
|
|
} |
|
|
|
|
|
|
|
private void onTimeSeriesUpdate(UUID entityId, List<TsKvEntry> data, TbCallback callback) { |
|
|
|
entityUpdates.get(entityId).timeSeriesUpdateTs = System.currentTimeMillis(); |
|
|
|
getEntityUpdatesInfo(entityId).timeSeriesUpdateTs = System.currentTimeMillis(); |
|
|
|
processSubscriptionData(entityId, |
|
|
|
sub -> TbSubscriptionType.TIMESERIES.equals(sub.getType()), |
|
|
|
s -> { |
|
|
|
@ -371,7 +371,7 @@ public class DefaultTbLocalSubscriptionService implements TbLocalSubscriptionSer |
|
|
|
} |
|
|
|
|
|
|
|
private void onAttributesUpdate(UUID entityId, String scope, List<TsKvEntry> data, TbCallback callback) { |
|
|
|
entityUpdates.get(entityId).attributesUpdateTs = System.currentTimeMillis(); |
|
|
|
getEntityUpdatesInfo(entityId).attributesUpdateTs = System.currentTimeMillis(); |
|
|
|
processSubscriptionData(entityId, |
|
|
|
sub -> TbSubscriptionType.ATTRIBUTES.equals(sub.getType()), |
|
|
|
s -> { |
|
|
|
@ -639,4 +639,8 @@ public class DefaultTbLocalSubscriptionService implements TbLocalSubscriptionSer |
|
|
|
throw new TbRateLimitsException(message); |
|
|
|
} |
|
|
|
|
|
|
|
private TbEntityUpdatesInfo getEntityUpdatesInfo(UUID entityId) { |
|
|
|
return entityUpdates.computeIfAbsent(entityId, id -> new TbEntityUpdatesInfo(0)); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|