Merge pull request #117 from p2p-org/logging-for-grpc-upstream-description-processing
Added log for grpc upstreams processing
This commit is contained in:
@@ -125,6 +125,7 @@ class GrpcUpstreams(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun processDescription(value: BlockchainOuterClass.DescribeResponse): Flux<UpstreamChangeEvent> {
|
fun processDescription(value: BlockchainOuterClass.DescribeResponse): Flux<UpstreamChangeEvent> {
|
||||||
|
log.info("Start processing grpc upstream description for $id with chains ${value.chainsList.map { it.chain.name }}")
|
||||||
val current = value.chainsList.filter {
|
val current = value.chainsList.filter {
|
||||||
Chain.byId(it.chain.number) != Chain.UNSPECIFIED
|
Chain.byId(it.chain.number) != Chain.UNSPECIFIED
|
||||||
}.mapNotNull { chainDetails ->
|
}.mapNotNull { chainDetails ->
|
||||||
@@ -149,6 +150,7 @@ class GrpcUpstreams(
|
|||||||
}.map {
|
}.map {
|
||||||
UpstreamChangeEvent(it.key, known.remove(it.key)!!, UpstreamChangeEvent.ChangeType.REMOVED)
|
UpstreamChangeEvent(it.key, known.remove(it.key)!!, UpstreamChangeEvent.ChangeType.REMOVED)
|
||||||
}
|
}
|
||||||
|
log.info("Finished processing of grpc upstream description for $id with content delta added [${added.map { it.chain }}] and removed [${removed.map { it.chain }}]")
|
||||||
return Flux.fromIterable(removed + added)
|
return Flux.fromIterable(removed + added)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user