add more logs to doge upstream (#773)
* add more logs to doge upstream * fix other similar cases
This commit is contained in:
@@ -44,7 +44,7 @@ class StreamHead(
|
|||||||
ms.getHead()
|
ms.getHead()
|
||||||
.getFlux()
|
.getFlux()
|
||||||
.map { asProto(ms, chain, it!!) }
|
.map { asProto(ms, chain, it!!) }
|
||||||
.onErrorContinue { t, _ ->
|
.onErrorContinue { t, _: Any? ->
|
||||||
log.warn("Head subscription error", t)
|
log.warn("Head subscription error", t)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class HeadLagObserver(
|
|||||||
.parallel(followers.size)
|
.parallel(followers.size)
|
||||||
.flatMap { up -> mapLagging(top, up, getCurrentBlocks(up)).subscribeOn(lagObserverScheduler) }
|
.flatMap { up -> mapLagging(top, up, getCurrentBlocks(up)).subscribeOn(lagObserverScheduler) }
|
||||||
.sequential()
|
.sequential()
|
||||||
.onErrorContinue { t, _ -> log.warn("Failed to update lagging distance", t) }
|
.onErrorContinue { t, _: Any? -> log.warn("Failed to update lagging distance", t) }
|
||||||
}
|
}
|
||||||
|
|
||||||
open fun getCurrentBlocks(up: Upstream): Flux<BlockContainer> {
|
open fun getCurrentBlocks(up: Upstream): Flux<BlockContainer> {
|
||||||
|
|||||||
@@ -71,8 +71,8 @@ class BitcoinRpcHead(
|
|||||||
.map(extractBlock::extract)
|
.map(extractBlock::extract)
|
||||||
.timeout(Defaults.timeout, Mono.error(Exception("Block data is not received")))
|
.timeout(Defaults.timeout, Mono.error(Exception("Block data is not received")))
|
||||||
}
|
}
|
||||||
.onErrorContinue { err, _ ->
|
.onErrorContinue { err, _: Any? ->
|
||||||
log.debug("RPC error ${err.message}")
|
log.warn("RPC error: ${err.message}")
|
||||||
}
|
}
|
||||||
refreshSubscription = super.follow(base)
|
refreshSubscription = super.follow(base)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ class GrpcUpstreams(
|
|||||||
return Flux.interval(Duration.ZERO, Duration.ofSeconds(20))
|
return Flux.interval(Duration.ZERO, Duration.ofSeconds(20))
|
||||||
.flatMap {
|
.flatMap {
|
||||||
authAndDescribe(grpcUpstreamsAuth)
|
authAndDescribe(grpcUpstreamsAuth)
|
||||||
}.onErrorContinue { t, _ ->
|
}.onErrorContinue { t, _: Any? ->
|
||||||
if (ExceptionUtils.indexOfType(t, IOException::class.java) >= 0) {
|
if (ExceptionUtils.indexOfType(t, IOException::class.java) >= 0) {
|
||||||
log.warn("gRPC upstream $host:$port is unavailable. (${t.javaClass}: ${t.message})")
|
log.warn("gRPC upstream $host:$port is unavailable. (${t.javaClass}: ${t.message})")
|
||||||
known.values.forEach {
|
known.values.forEach {
|
||||||
|
|||||||
Reference in New Issue
Block a user