From 1998505679930615a81fab5e0e306886ba14f284 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Thu, 29 Jul 2021 23:26:40 +0300 Subject: [PATCH] index: update removed value in progress report Fixes: #2016 --- lib/index/mu-indexer.cc | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/lib/index/mu-indexer.cc b/lib/index/mu-indexer.cc index b44567e1..8a44e516 100644 --- a/lib/index/mu-indexer.cc +++ b/lib/index/mu-indexer.cc @@ -233,8 +233,8 @@ Indexer::Private::cleanup() }); g_debug("remove %zu message(s) from store", orphans.size()); - store_.remove_messages (orphans); + progress_.removed += orphans.size(); return true; } @@ -273,19 +273,11 @@ Indexer::Private::start(const Indexer::Config& conf) } - { - // now there may still be messages in the work queue... - // finish those; this is a bit ugly; perhaps we should - // handle SIGTERM etc. - while (!fq_.empty()) - std::this_thread::sleep_for(100ms); - } - - if (!fq_.empty()) { - g_warning ("scan takes too long; dropping %zu file(s) from queue", - fq_.size()); - fq_.clear(); - } + // now there may still be messages in the work queue... + // finish those; this is a bit ugly; perhaps we should + // handle SIGTERM etc. + while (!fq_.empty()) + std::this_thread::sleep_for(100ms); if (conf_.cleanup) { g_debug ("starting cleanup");