Browse Source
Merge pull request #15366 from dashevchenko/deprecatedFieldsCleanup
Deleted deprecated proto field and corresponding code
pull/15399/head
Viacheslav Klimov
2 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
1 additions and
14 deletions
-
application/src/main/java/org/thingsboard/server/service/ruleengine/DefaultRuleEngineCallService.java
-
common/message/src/main/java/org/thingsboard/server/common/msg/TbMsg.java
-
common/proto/src/main/proto/queue.proto
|
|
|
@ -73,7 +73,7 @@ public class DefaultRuleEngineCallService implements RuleEngineCallService { |
|
|
|
UUID requestId = new UUID(restApiCallResponseMsg.getRequestIdMSB(), restApiCallResponseMsg.getRequestIdLSB()); |
|
|
|
Consumer<TbMsg> consumer = requests.remove(requestId); |
|
|
|
if (consumer != null) { |
|
|
|
consumer.accept(TbMsg.fromProto(null, restApiCallResponseMsg.getResponseProto(), restApiCallResponseMsg.getResponse(), TbMsgCallback.EMPTY)); |
|
|
|
consumer.accept(TbMsg.fromProto(null, restApiCallResponseMsg.getResponseProto(), TbMsgCallback.EMPTY)); |
|
|
|
} else { |
|
|
|
log.trace("[{}] Unknown or stale rest api call response received", requestId); |
|
|
|
} |
|
|
|
|
|
|
|
@ -204,18 +204,6 @@ public final class TbMsg implements Serializable { |
|
|
|
return builder.build(); |
|
|
|
} |
|
|
|
|
|
|
|
@Deprecated(forRemoval = true, since = "4.1") // to be removed in 4.2
|
|
|
|
public static TbMsg fromProto(String queueName, TbMsgProto proto, ByteString data, TbMsgCallback callback) { |
|
|
|
try { |
|
|
|
if (!data.isEmpty()) { |
|
|
|
proto = TbMsgProto.parseFrom(data); |
|
|
|
} |
|
|
|
} catch (InvalidProtocolBufferException e) { |
|
|
|
throw new IllegalStateException("Could not parse protobuf for TbMsg", e); |
|
|
|
} |
|
|
|
return fromProto(queueName, proto, callback); |
|
|
|
} |
|
|
|
|
|
|
|
public static TbMsg fromProto(String queueName, TbMsgProto proto, TbMsgCallback callback) { |
|
|
|
TbMsgMetaData metaData = new TbMsgMetaData(proto.getMetaData().getDataMap()); |
|
|
|
EntityId entityId = EntityIdFactory.getByTypeAndUuid(proto.getEntityType(), new UUID(proto.getEntityIdMSB(), proto.getEntityIdLSB())); |
|
|
|
|
|
|
|
@ -132,7 +132,6 @@ message SessionInfoProto { |
|
|
|
message RestApiCallResponseMsgProto { |
|
|
|
int64 requestIdMSB = 1; |
|
|
|
int64 requestIdLSB = 2; |
|
|
|
bytes response = 5 [deprecated = true]; |
|
|
|
msgqueue.TbMsgProto responseProto = 6; |
|
|
|
} |
|
|
|
|
|
|
|
|