mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-19 01:34:57 +00:00
update negentropy
This commit is contained in:
@ -107,13 +107,15 @@ void RelayServer::runCron() {
|
||||
|
||||
if (expiredLevIds.size() > 0) {
|
||||
auto txn = env.txn_rw();
|
||||
negentropy::storage::BTreeLMDB negentropyStorage(txn, negentropyDbi, 0);
|
||||
|
||||
uint64_t numDeleted = 0;
|
||||
|
||||
for (auto levId : expiredLevIds) {
|
||||
if (deleteEvent(txn, levId)) numDeleted++;
|
||||
if (deleteEvent(txn, levId, negentropyStorage)) numDeleted++;
|
||||
}
|
||||
|
||||
negentropyStorage.flush();
|
||||
txn.commit();
|
||||
|
||||
if (numDeleted) LI << "Deleted " << numDeleted << " events (ephemeral=" << numEphemeral << " expired=" << numExpired << ")";
|
||||
|
Reference in New Issue
Block a user