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:
a10zn8
2023-01-17 12:56:34 +04:00
parent 656b3952a8
commit a23d28b5e6
4 changed files with 5 additions and 3 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -198,7 +198,7 @@ abstract class Multistream(
}
lagObserver?.stop()
lagObserver = null
if (upstreams.isNotEmpty()) {
if (upstreams.size > 1) {
lagObserver = makeLagObserver()
}
}

View File

@@ -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) {