Merge pull request #8325 from volodymyr-babak/edge-log-fix
[3.5] Fixed logging of EdgeGrpcSession
This commit is contained in:
commit
6bcbfc1b28
@ -670,18 +670,19 @@ public final class EdgeGrpcSession implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void interruptPreviousSendDownlinkMsgsTask() {
|
private void interruptPreviousSendDownlinkMsgsTask() {
|
||||||
log.info("[{}]Previous send downlink future was not properly completed, stopping it now!", this.sessionId);
|
String msg = String.format("[%s] Previous send downlink future was not properly completed, stopping it now!", this.sessionId);
|
||||||
stopCurrentSendDownlinkMsgsTask(new RuntimeException());
|
stopCurrentSendDownlinkMsgsTask(new RuntimeException(msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void interruptGeneralProcessingOnSync(TenantId tenantId, EdgeId edgeId) {
|
private void interruptGeneralProcessingOnSync(TenantId tenantId, EdgeId edgeId) {
|
||||||
log.info("[{}][{}][{}] Sync process started. General processing interrupted!", this.sessionId, tenantId, edgeId);
|
String msg = String.format("[%s][%s] Sync process started. General processing interrupted!", tenantId, edgeId);
|
||||||
stopCurrentSendDownlinkMsgsTask(new RuntimeException());
|
stopCurrentSendDownlinkMsgsTask(new RuntimeException(msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void stopCurrentSendDownlinkMsgsTask(Exception e) {
|
public void stopCurrentSendDownlinkMsgsTask(Exception e) {
|
||||||
if (sessionState.getSendDownlinkMsgsFuture() != null && !sessionState.getSendDownlinkMsgsFuture().isDone()) {
|
if (sessionState.getSendDownlinkMsgsFuture() != null && !sessionState.getSendDownlinkMsgsFuture().isDone()) {
|
||||||
if (e != null) {
|
if (e != null) {
|
||||||
|
log.debug(e.getMessage());
|
||||||
sessionState.getSendDownlinkMsgsFuture().setException(e);
|
sessionState.getSendDownlinkMsgsFuture().setException(e);
|
||||||
} else {
|
} else {
|
||||||
sessionState.getSendDownlinkMsgsFuture().set(null);
|
sessionState.getSendDownlinkMsgsFuture().set(null);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user