mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-04 06:53:12 +00:00
Fix: metrics-server use after submodule update (#610)
* Fix: metrics-server use after submodule update * Remove insecure check
This commit is contained in:
parent
0fe7d60891
commit
a8da4dfd6b
@ -1,6 +1,7 @@
|
|||||||
import
|
import
|
||||||
std/[tables, times, strutils, hashes, sequtils],
|
std/[tables, times, strutils, hashes, sequtils],
|
||||||
chronos, confutils, chronicles, chronicles/topics_registry, metrics,
|
chronos, confutils, chronicles, chronicles/topics_registry,
|
||||||
|
metrics, metrics/chronos_httpserver,
|
||||||
stew/[byteutils, endians2],
|
stew/[byteutils, endians2],
|
||||||
stew/shims/net as stewNet, json_rpc/rpcserver,
|
stew/shims/net as stewNet, json_rpc/rpcserver,
|
||||||
# Matterbridge client imports
|
# Matterbridge client imports
|
||||||
@ -278,12 +279,11 @@ when isMainModule:
|
|||||||
|
|
||||||
rpcServer.start()
|
rpcServer.start()
|
||||||
|
|
||||||
when defined(insecure):
|
if conf.metricsServer:
|
||||||
if conf.metricsServer:
|
let
|
||||||
let
|
address = conf.metricsServerAddress
|
||||||
address = conf.metricsServerAddress
|
port = conf.metricsServerPort + conf.portsShift
|
||||||
port = conf.metricsServerPort + conf.portsShift
|
info "Starting metrics HTTP server", address, port
|
||||||
info "Starting metrics HTTP server", address, port
|
startMetricsHttpServer($address, Port(port))
|
||||||
metrics.startHttpServer($address, Port(port))
|
|
||||||
|
|
||||||
runForever()
|
runForever()
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import
|
import
|
||||||
std/[tables, hashes, sequtils],
|
std/[tables, hashes, sequtils],
|
||||||
chronos, confutils, chronicles, chronicles/topics_registry, metrics,
|
chronos, confutils, chronicles, chronicles/topics_registry,
|
||||||
|
metrics, metrics/chronos_httpserver,
|
||||||
stew/[byteutils, objects],
|
stew/[byteutils, objects],
|
||||||
stew/shims/net as stewNet, json_rpc/rpcserver,
|
stew/shims/net as stewNet, json_rpc/rpcserver,
|
||||||
# Waku v1 imports
|
# Waku v1 imports
|
||||||
@ -284,12 +285,11 @@ when isMainModule:
|
|||||||
|
|
||||||
rpcServer.start()
|
rpcServer.start()
|
||||||
|
|
||||||
when defined(insecure):
|
if conf.metricsServer:
|
||||||
if conf.metricsServer:
|
let
|
||||||
let
|
address = conf.metricsServerAddress
|
||||||
address = conf.metricsServerAddress
|
port = conf.metricsServerPort + conf.portsShift
|
||||||
port = conf.metricsServerPort + conf.portsShift
|
info "Starting metrics HTTP server", address, port
|
||||||
info "Starting metrics HTTP server", address, port
|
startMetricsHttpServer($address, Port(port))
|
||||||
metrics.startHttpServer($address, Port(port))
|
|
||||||
|
|
||||||
runForever()
|
runForever()
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import
|
import
|
||||||
confutils, chronos, json_rpc/rpcserver, metrics, metrics/chronicles_support,
|
confutils, chronos, json_rpc/rpcserver,
|
||||||
|
metrics, metrics/chronicles_support, metrics/chronos_httpserver,
|
||||||
stew/shims/net as stewNet,
|
stew/shims/net as stewNet,
|
||||||
eth/[keys, p2p], eth/common/utils,
|
eth/[keys, p2p], eth/common/utils,
|
||||||
eth/p2p/[discovery, enode, peer_pool, bootnodes, whispernodes],
|
eth/p2p/[discovery, enode, peer_pool, bootnodes, whispernodes],
|
||||||
@ -98,13 +99,12 @@ proc run(config: WakuNodeConf, rng: ref BrHmacDrbgContext) =
|
|||||||
discard setTimer(Moment.fromNow(2.seconds), logPeerAccounting)
|
discard setTimer(Moment.fromNow(2.seconds), logPeerAccounting)
|
||||||
discard setTimer(Moment.fromNow(2.seconds), logPeerAccounting)
|
discard setTimer(Moment.fromNow(2.seconds), logPeerAccounting)
|
||||||
|
|
||||||
when defined(insecure):
|
if config.metricsServer:
|
||||||
if config.metricsServer:
|
let
|
||||||
let
|
address = config.metricsServerAddress
|
||||||
address = config.metricsServerAddress
|
port = config.metricsServerPort + config.portsShift
|
||||||
port = config.metricsServerPort + config.portsShift
|
info "Starting metrics HTTP server", address, port
|
||||||
info "Starting metrics HTTP server", address, port
|
startMetricsHttpServer($address, Port(port))
|
||||||
metrics.startHttpServer($address, Port(port))
|
|
||||||
|
|
||||||
if config.logMetrics:
|
if config.logMetrics:
|
||||||
# https://github.com/nim-lang/Nim/issues/17369
|
# https://github.com/nim-lang/Nim/issues/17369
|
||||||
|
|||||||
@ -781,10 +781,9 @@ when isMainModule:
|
|||||||
if conf.metricsLogging:
|
if conf.metricsLogging:
|
||||||
startMetricsLog()
|
startMetricsLog()
|
||||||
|
|
||||||
when defined(insecure):
|
if conf.metricsServer:
|
||||||
if conf.metricsServer:
|
startMetricsServer(conf.metricsServerAddress,
|
||||||
startMetricsServer(conf.metricsServerAddress,
|
Port(conf.metricsServerPort + conf.portsShift))
|
||||||
Port(conf.metricsServerPort + conf.portsShift))
|
|
||||||
|
|
||||||
# Setup graceful shutdown
|
# Setup graceful shutdown
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user