fixes
This commit is contained in:
parent
cd70b6fb54
commit
53eb60e67d
@ -80,7 +80,7 @@ public class TbMsgPushToEdgeNode implements TbNode {
|
|||||||
ListenableFuture<EdgeId> getEdgeIdFuture = getEdgeIdByOriginatorId(ctx, ctx.getTenantId(), msg.getOriginator());
|
ListenableFuture<EdgeId> getEdgeIdFuture = getEdgeIdByOriginatorId(ctx, ctx.getTenantId(), msg.getOriginator());
|
||||||
Futures.addCallback(getEdgeIdFuture, new FutureCallback<EdgeId>() {
|
Futures.addCallback(getEdgeIdFuture, new FutureCallback<EdgeId>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(@org.checkerframework.checker.nullness.qual.Nullable EdgeId edgeId) {
|
public void onSuccess(@Nullable EdgeId edgeId) {
|
||||||
EdgeEventType edgeEventTypeByEntityType = ctx.getEdgeEventService().getEdgeEventTypeByEntityType(msg.getOriginator().getEntityType());
|
EdgeEventType edgeEventTypeByEntityType = ctx.getEdgeEventService().getEdgeEventTypeByEntityType(msg.getOriginator().getEntityType());
|
||||||
if (edgeEventTypeByEntityType == null) {
|
if (edgeEventTypeByEntityType == null) {
|
||||||
log.debug("Edge event type is null. Entity Type {}", msg.getOriginator().getEntityType());
|
log.debug("Edge event type is null. Entity Type {}", msg.getOriginator().getEntityType());
|
||||||
@ -97,16 +97,19 @@ public class TbMsgPushToEdgeNode implements TbNode {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(@Nullable EdgeEvent event) {
|
public void onSuccess(@Nullable EdgeEvent event) {
|
||||||
ctx.tellNext(msg, SUCCESS);
|
ctx.tellNext(msg, SUCCESS);
|
||||||
} @Override
|
}
|
||||||
|
@Override
|
||||||
public void onFailure(Throwable th) {
|
public void onFailure(Throwable th) {
|
||||||
log.error("Could not save edge event", th);
|
log.error("Could not save edge event", th);
|
||||||
ctx.tellFailure(msg, th);
|
ctx.tellFailure(msg, th);
|
||||||
}
|
}
|
||||||
}, ctx.getDbCallbackExecutor());
|
}, ctx.getDbCallbackExecutor());
|
||||||
} @Override
|
}
|
||||||
|
@Override
|
||||||
public void onFailure(Throwable t) {
|
public void onFailure(Throwable t) {
|
||||||
ctx.tellFailure(msg, t);
|
ctx.tellFailure(msg, t);
|
||||||
}
|
}
|
||||||
|
|
||||||
}, ctx.getDbCallbackExecutor());
|
}, ctx.getDbCallbackExecutor());
|
||||||
} else {
|
} else {
|
||||||
log.debug("Unsupported msg type {}", msg.getType());
|
log.debug("Unsupported msg type {}", msg.getType());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user