[Server+Client] Tombstone deck deletes with purge and base snapshots

This commit is contained in:
Lukas Brübach 2026-10-11 16:05:22 +02:00 • committed by Lukas Brübach
parent 997eee835e
commit fe9f5ad098
8 changed files with 180 additions and 21 deletions

View file

@ -629,6 +629,7 @@ bool Servatrice::initServer()
deckShareCleanupClock = new QTimer(this);
connect(deckShareCleanupClock, &QTimer::timeout, this, &Servatrice::cleanupExpiredDeckShares);
connect(deckShareCleanupClock, &QTimer::timeout, this, &Servatrice::purgeDeckTombstones);
const int deckShareCleanupInterval = getDeckShareCleanupInterval();
if (deckShareCleanupInterval > 0) {
qDebug() << "Starting deck share cleanup clock, interval" << deckShareCleanupInterval << "ms";
@ -863,6 +864,11 @@ void Servatrice::cleanupExpiredDeckShares()
servatriceDatabaseInterface->cleanupExpiredDeckShares();
}
void Servatrice::purgeDeckTombstones()
{
servatriceDatabaseInterface->purgeDeckTombstones(getDeckSyncTombstoneDays());
}
void Servatrice::statusUpdate()
{
if (!servatriceDatabaseInterface->checkSql()) {
@ -1402,6 +1408,11 @@ int Servatrice::getDeckSyncMaxVersions() const
return qMax(1, settingsCache->value("deck_sync/max_versions", 20).toInt());
}
int Servatrice::getDeckSyncTombstoneDays() const
{
return qMax(0, settingsCache->value("deck_sync/tombstone_days", 30).toInt());
}
int Servatrice::getNumberOfTCPPools() const
{
return settingsCache->value("server/number_pools", 1).toInt();