mirror of https://github.com/waku-org/nwaku.git
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"])
|
||||
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"
|
||||
|
||||
chat2_mb_transfers.inc(labelValues = ["chat2_to_mb"])
|
||||
|
@ -249,6 +254,8 @@ when isMainModule:
|
|||
|
||||
# Now load rest of config
|
||||
# Mount configured Waku v2 protocols
|
||||
mountKeepalive(bridge.nodev2)
|
||||
|
||||
if conf.store:
|
||||
mountStore(bridge.nodev2)
|
||||
|
||||
|
|
|
@ -254,6 +254,8 @@ when isMainModule:
|
|||
elif conf.fleetV1 == test: connectToNodes(bridge.nodev1, WhisperNodesTest)
|
||||
|
||||
# Mount configured Waku v2 protocols
|
||||
mountKeepalive(bridge.nodev2)
|
||||
|
||||
if conf.store:
|
||||
mountStore(bridge.nodev2, persistMessages = false) # Bridge does not persist messages
|
||||
|
||||
|
|
|
@ -642,8 +642,11 @@ when isMainModule:
|
|||
|
||||
proc startMetricsServer(serverIp: ValidIpAddress, serverPort: Port) =
|
||||
info "Starting metrics HTTP server", serverIp, serverPort
|
||||
|
||||
metrics.startHttpServer($serverIp, serverPort)
|
||||
|
||||
info "Metrics HTTP server started", serverIp, serverPort
|
||||
|
||||
proc startMetricsLog() =
|
||||
# https://github.com/nim-lang/Nim/issues/17369
|
||||
var logMetrics: proc(udata: pointer) {.gcsafe, raises: [Defect].}
|
||||
|
|
Loading…
Reference in New Issue