fixed small typos in thread pools names
lag observer should be created only in case there are more than 1 upstreams exists
This commit is contained in:
@@ -66,7 +66,7 @@ open class GrpcServer(
|
||||
serverBuilder.addService(it)
|
||||
}
|
||||
|
||||
val pool = Executors.newFixedThreadPool(20, CustomizableThreadFactory("fixed-grpc-%d"))
|
||||
val pool = Executors.newFixedThreadPool(20, CustomizableThreadFactory("fixed-grpc-"))
|
||||
|
||||
serverBuilder.executor(
|
||||
if (mainConfig.monitoring.enableExtended)
|
||||
|
||||
@@ -28,7 +28,7 @@ open class SchedulersConfig {
|
||||
}
|
||||
|
||||
private fun makeScheduler(name: String, prefix: String, size: Int, monitoringConfig: MonitoringConfig): Scheduler {
|
||||
val pool = Executors.newFixedThreadPool(size, CustomizableThreadFactory("$name-%d"))
|
||||
val pool = Executors.newFixedThreadPool(size, CustomizableThreadFactory("$name-"))
|
||||
|
||||
return Schedulers.fromExecutorService(
|
||||
if (monitoringConfig.enableExtended)
|
||||
|
||||
@@ -198,7 +198,7 @@ abstract class Multistream(
|
||||
}
|
||||
lagObserver?.stop()
|
||||
lagObserver = null
|
||||
if (upstreams.isNotEmpty()) {
|
||||
if (upstreams.size > 1) {
|
||||
lagObserver = makeLagObserver()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ import io.emeraldpay.dshackle.upstream.rpcclient.JsonRpcRequest
|
||||
import io.emeraldpay.dshackle.upstream.rpcclient.JsonRpcResponse
|
||||
import io.emeraldpay.etherjar.domain.BlockHash
|
||||
import io.emeraldpay.etherjar.rpc.RpcException
|
||||
import io.grpc.ManagedChannel
|
||||
import org.reactivestreams.Publisher
|
||||
import org.slf4j.LoggerFactory
|
||||
import reactor.core.publisher.Flux
|
||||
@@ -119,6 +120,7 @@ open class EthereumPosGrpcUpstream(
|
||||
}
|
||||
|
||||
override fun stop() {
|
||||
|
||||
}
|
||||
|
||||
override fun update(conf: BlockchainOuterClass.DescribeChain) {
|
||||
|
||||
Reference in New Issue
Block a user