mirror of
https://github.com/waku-org/nwaku.git
synced 2025-02-04 19:14:47 +00:00
Mount keepalive on chat2bridge and bridge (#591)
This commit is contained in:
parent
106418113f
commit
83f546ede4
@ -95,6 +95,11 @@ proc toMatterbridge(cmb: Chat2MatterBridge, msg: WakuMessage) {.gcsafe.} =
|
|||||||
chat2_mb_dropped.inc(labelValues = ["duplicate"])
|
chat2_mb_dropped.inc(labelValues = ["duplicate"])
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if msg.contentTopic != cmb.contentTopic:
|
||||||
|
# Only bridge messages on the configured content topic
|
||||||
|
chat2_mb_dropped.inc(labelValues = ["filtered"])
|
||||||
|
return
|
||||||
|
|
||||||
trace "Post chat2 message to Matterbridge"
|
trace "Post chat2 message to Matterbridge"
|
||||||
|
|
||||||
chat2_mb_transfers.inc(labelValues = ["chat2_to_mb"])
|
chat2_mb_transfers.inc(labelValues = ["chat2_to_mb"])
|
||||||
@ -249,6 +254,8 @@ when isMainModule:
|
|||||||
|
|
||||||
# Now load rest of config
|
# Now load rest of config
|
||||||
# Mount configured Waku v2 protocols
|
# Mount configured Waku v2 protocols
|
||||||
|
mountKeepalive(bridge.nodev2)
|
||||||
|
|
||||||
if conf.store:
|
if conf.store:
|
||||||
mountStore(bridge.nodev2)
|
mountStore(bridge.nodev2)
|
||||||
|
|
||||||
|
@ -254,6 +254,8 @@ when isMainModule:
|
|||||||
elif conf.fleetV1 == test: connectToNodes(bridge.nodev1, WhisperNodesTest)
|
elif conf.fleetV1 == test: connectToNodes(bridge.nodev1, WhisperNodesTest)
|
||||||
|
|
||||||
# Mount configured Waku v2 protocols
|
# Mount configured Waku v2 protocols
|
||||||
|
mountKeepalive(bridge.nodev2)
|
||||||
|
|
||||||
if conf.store:
|
if conf.store:
|
||||||
mountStore(bridge.nodev2, persistMessages = false) # Bridge does not persist messages
|
mountStore(bridge.nodev2, persistMessages = false) # Bridge does not persist messages
|
||||||
|
|
||||||
|
@ -642,8 +642,11 @@ when isMainModule:
|
|||||||
|
|
||||||
proc startMetricsServer(serverIp: ValidIpAddress, serverPort: Port) =
|
proc startMetricsServer(serverIp: ValidIpAddress, serverPort: Port) =
|
||||||
info "Starting metrics HTTP server", serverIp, serverPort
|
info "Starting metrics HTTP server", serverIp, serverPort
|
||||||
|
|
||||||
metrics.startHttpServer($serverIp, serverPort)
|
metrics.startHttpServer($serverIp, serverPort)
|
||||||
|
|
||||||
|
info "Metrics HTTP server started", serverIp, serverPort
|
||||||
|
|
||||||
proc startMetricsLog() =
|
proc startMetricsLog() =
|
||||||
# https://github.com/nim-lang/Nim/issues/17369
|
# https://github.com/nim-lang/Nim/issues/17369
|
||||||
var logMetrics: proc(udata: pointer) {.gcsafe, raises: [Defect].}
|
var logMetrics: proc(udata: pointer) {.gcsafe, raises: [Defect].}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user