Merge branch 'master' of github.com:thingsboard/thingsboard
This commit is contained in:
commit
ea63f72eb6
@ -76,6 +76,7 @@ public class ServerSideRpcCallAction extends SimpleRuleLifecycleComponent implem
|
|||||||
toDeviceRelationTemplate.ifPresent(t -> builder.toDeviceRelation(VelocityUtils.merge(t, context)));
|
toDeviceRelationTemplate.ifPresent(t -> builder.toDeviceRelation(VelocityUtils.merge(t, context)));
|
||||||
rpcCallMethodTemplate.ifPresent(t -> builder.rpcCallMethod(VelocityUtils.merge(t, context)));
|
rpcCallMethodTemplate.ifPresent(t -> builder.rpcCallMethod(VelocityUtils.merge(t, context)));
|
||||||
rpcCallBodyTemplate.ifPresent(t -> builder.rpcCallBody(VelocityUtils.merge(t, context)));
|
rpcCallBodyTemplate.ifPresent(t -> builder.rpcCallBody(VelocityUtils.merge(t, context)));
|
||||||
|
builder.rpcCallTimeoutInSec(configuration.getRpcCallTimeoutInSec());
|
||||||
return Optional.of(new ServerSideRpcCallRuleToPluginActionMsg(toDeviceActorMsg.getTenantId(), toDeviceActorMsg.getCustomerId(), toDeviceActorMsg.getDeviceId(),
|
return Optional.of(new ServerSideRpcCallRuleToPluginActionMsg(toDeviceActorMsg.getTenantId(), toDeviceActorMsg.getCustomerId(), toDeviceActorMsg.getDeviceId(),
|
||||||
builder.build()));
|
builder.build()));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -70,7 +70,7 @@ public class RpcRuleMsgHandler implements RuleMsgHandler {
|
|||||||
deviceIds = relations.stream().map(EntityRelation::getFrom).collect(Collectors.toList());
|
deviceIds = relations.stream().map(EntityRelation::getFrom).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
ToDeviceRpcRequestBody body = new ToDeviceRpcRequestBody(msg.getRpcCallMethod(), msg.getRpcCallBody());
|
ToDeviceRpcRequestBody body = new ToDeviceRpcRequestBody(msg.getRpcCallMethod(), msg.getRpcCallBody());
|
||||||
long expirationTime = System.currentTimeMillis() + msg.getRpcCallTimeoutInSec();
|
long expirationTime = System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(msg.getRpcCallTimeoutInSec());
|
||||||
for (EntityId address : deviceIds) {
|
for (EntityId address : deviceIds) {
|
||||||
DeviceId tmpId = new DeviceId(address.getId());
|
DeviceId tmpId = new DeviceId(address.getId());
|
||||||
ctx.checkAccess(tmpId, new PluginCallback<Void>() {
|
ctx.checkAccess(tmpId, new PluginCallback<Void>() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user