mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-18 10:52:26 +00:00
deploy: 3b60ea70c0d75c7bbbe9fc4094bd6f6371b6d6f4
This commit is contained in:
parent
31fb68a8f8
commit
467038ff75
vendor/nim-libbacktrace/vendor/libbacktrace-upstream
waku/v2/node/storage/message
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# libtool - Provide generalized library-building support services.
|
# libtool - Provide generalized library-building support services.
|
||||||
# Generated automatically by config.status (libbacktrace) version-unused
|
# Generated automatically by config.status (libbacktrace) version-unused
|
||||||
# Libtool was configured on host fv-az196-685:
|
# Libtool was configured on host fv-az39-123:
|
||||||
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
||||||
#
|
#
|
||||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
||||||
|
@ -100,11 +100,6 @@ proc deleteOldest(db: WakuMessageStore): MessageStoreResult[void] =
|
|||||||
let numMessages = messageCount(db.database).get() # requires another SELECT query, so only run in debug mode
|
let numMessages = messageCount(db.database).get() # requires another SELECT query, so only run in debug mode
|
||||||
debug "Number of messages left after delete operation.", messagesLeft=numMessages
|
debug "Number of messages left after delete operation.", messagesLeft=numMessages
|
||||||
|
|
||||||
# reduce the size of the DB file after the delete operation. See: https://www.sqlite.org/lang_vacuum.html
|
|
||||||
let resVacuum = db.database.query("vacuum", proc(s: ptr sqlite3_stmt) = discard)
|
|
||||||
if resVacuum.isErr:
|
|
||||||
return err("vacuum after delete was not successful: " & resVacuum.error)
|
|
||||||
|
|
||||||
ok()
|
ok()
|
||||||
|
|
||||||
proc init*(T: type WakuMessageStore, db: SqliteDatabase, storeCapacity: int = 50000, isSqliteOnly = false, retentionTime = chronos.days(30).seconds): MessageStoreResult[T] =
|
proc init*(T: type WakuMessageStore, db: SqliteDatabase, storeCapacity: int = 50000, isSqliteOnly = false, retentionTime = chronos.days(30).seconds): MessageStoreResult[T] =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user