Browse Source
Merge pull request #13003 from irynamatveieva/cf-fixes
Calculated fields: fixed timeouts
pull/13016/head
Viacheslav Klimov
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
6 additions and
0 deletions
-
application/src/main/java/org/thingsboard/server/actors/calculatedField/CalculatedFieldEntityMessageProcessor.java
-
application/src/main/java/org/thingsboard/server/actors/calculatedField/CalculatedFieldManagerMessageProcessor.java
|
|
|
@ -302,6 +302,8 @@ public class CalculatedFieldEntityMessageProcessor extends AbstractContextAwareM |
|
|
|
systemContext.persistCalculatedFieldDebugEvent(tenantId, ctx.getCfId(), entityId, state.getArguments(), tbMsgId, tbMsgType, JacksonUtil.writeValueAsString(calculationResult.getResult()), null); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
callback.onSuccess(); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
throw CalculatedFieldException.builder().ctx(ctx).eventEntity(entityId).msgId(tbMsgId).msgType(tbMsgType).arguments(state.getArguments()).cause(e).build(); |
|
|
|
|
|
|
|
@ -367,6 +367,10 @@ public class CalculatedFieldManagerMessageProcessor extends AbstractContextAware |
|
|
|
log.debug("Received linked telemetry msg from entity [{}]", sourceEntityId); |
|
|
|
var proto = msg.getProto(); |
|
|
|
var linksList = proto.getLinksList(); |
|
|
|
if (linksList.isEmpty()) { |
|
|
|
log.debug("[{}] No CF links to process new telemetry.", msg.getTenantId()); |
|
|
|
msg.getCallback().onSuccess(); |
|
|
|
} |
|
|
|
for (var linkProto : linksList) { |
|
|
|
var link = fromProto(linkProto); |
|
|
|
var targetEntityId = link.entityId(); |
|
|
|
|