aboutsummaryrefslogtreecommitdiffstats
path: root/src/m_key_server_sync/KeyServerBatchLogic.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2026-10-22 22:47:07 +0200
committersaturneric <[email protected]>2026-10-22 22:47:07 +0200
commit7216765fcaf66c5e3813afc4bd663e3ed090ae57 (patch)
tree8bdb74be693e4a9da86d3b67662642465730c66e /src/m_key_server_sync/KeyServerBatchLogic.cpp
parentfeat(email): re-check open messages when key databases are reloaded (diff)
downloadmodules-7216765fcaf66c5e3813afc4bd663e3ed090ae57.tar.gz
modules-7216765fcaf66c5e3813afc4bd663e3ed090ae57.zip
fix(key_server_sync): stop batches when key databases are reloaded
- listen for KEY_DATABASES_RELOADED and stop batches started before it - say how far a stopped batch got, and that nothing fetched was imported - report a refused import instead of counting the keys as refreshed - tell the user when a single key update cannot be imported
Diffstat (limited to 'src/m_key_server_sync/KeyServerBatchLogic.cpp')
-rw-r--r--src/m_key_server_sync/KeyServerBatchLogic.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/m_key_server_sync/KeyServerBatchLogic.cpp b/src/m_key_server_sync/KeyServerBatchLogic.cpp
index 77411bc..18588eb 100644
--- a/src/m_key_server_sync/KeyServerBatchLogic.cpp
+++ b/src/m_key_server_sync/KeyServerBatchLogic.cpp
@@ -102,4 +102,12 @@ auto PublishSummary(int published, int total, const QString& host,
failures);
}
+auto InterruptedSummary(int handled, int total) -> QString {
+ return GTrC::tr("The key databases were changed while this was running, so "
+ "it was stopped after %1 of %2 keys. Nothing fetched was "
+ "imported. Please start it again.")
+ .arg(handled)
+ .arg(total);
+}
+
} // namespace KeyServerBatchLogic