mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-02-25 08:13:14 +00:00
chore: Minor enhancements (#2789)
* archive.nim: reduce the database report interval from 1 to 30 min This counts the number of rows with "select count(1) from messages" which is quite intense and we shouldn't run it every minute * aside cleanup
This commit is contained in:
parent
c5d19c4491
commit
31bd6d71c0
@ -169,7 +169,6 @@ proc parseCmdArg*(T: type EthRpcUrl, s: string): T =
|
||||
var wsPattern =
|
||||
re2"^(wss?):\/\/((localhost)|([\w_-]+(?:(?:\.[\w_-]+)+)))(:[0-9]{1,5})?([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])*"
|
||||
if regex.match(s, wsPattern):
|
||||
echo "here"
|
||||
raise newException(
|
||||
ValueError, "Websocket RPC URL is not supported, Please use an HTTP URL"
|
||||
)
|
||||
|
||||
@ -29,7 +29,7 @@ const
|
||||
WakuArchiveDefaultRetentionPolicyInterval* = chronos.minutes(30)
|
||||
|
||||
# Metrics reporting
|
||||
WakuArchiveDefaultMetricsReportInterval* = chronos.minutes(1)
|
||||
WakuArchiveDefaultMetricsReportInterval* = chronos.minutes(30)
|
||||
|
||||
# Message validation
|
||||
# 20 seconds maximum allowable sender timestamp "drift"
|
||||
|
||||
@ -94,8 +94,6 @@ method getMessagesV2*(
|
||||
maxPageSize = DefaultPageSize,
|
||||
ascendingOrder = true,
|
||||
): Future[ArchiveDriverResult[seq[ArchiveRow]]] {.async, deprecated.} =
|
||||
echo "here"
|
||||
|
||||
let cursor = cursor.map(toDbCursor)
|
||||
|
||||
let rowsRes = s.db.selectMessagesByHistoryQueryWithLimit(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user