index: don't assume very fast machine cfg drive

The scanner had a timeout for scanning, which doesn't work too well with
machine with rel. fast disks / rel. slow machines. Which I don't happen
to have!

Let's remove the timeout, should help with getting unwanted timeouts
which would cut short the indexing.
This commit is contained in:
Dirk-Jan C. Binnema
2021-07-28 17:04:39 +03:00
parent f583207842
commit 7fa80f77e9

View File

@ -275,11 +275,10 @@ Indexer::Private::start(const Indexer::Config& conf)
{
// now there may still be messages in the work queue...
// finish those, but only for a while.
const auto start{std::chrono::steady_clock::now()};
while (!fq_.empty() && std::chrono::steady_clock::now() - start < 10s) {
// 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()) {