make sure that filters AND DB storing runs in a "serialized" manner

This commit is contained in:
Martin Rotter 2023-08-22 08:05:47 +02:00
parent c70c1ec5da
commit 68764732ab
2 changed files with 9 additions and 6 deletions

View File

@ -259,6 +259,8 @@ void FeedDownloader::updateOneFeed(ServiceRoot* acc,
}
}
QMutexLocker lck(&m_mutexDb);
if (!feed->messageFilters().isEmpty()) {
tmr.restart();
@ -276,8 +278,6 @@ void FeedDownloader::updateOneFeed(ServiceRoot* acc,
QList<Message> read_msgs, important_msgs;
for (int i = 0; i < msgs.size(); i++) {
QMutexLocker lck(&m_mutexDb);
Message msg_original(msgs[i]);
Message* msg_tweaked_by_filter = &msgs[i];
@ -406,7 +406,7 @@ void FeedDownloader::updateOneFeed(ServiceRoot* acc,
removeDuplicateMessages(msgs);
tmr.restart();
auto updated_messages = acc->updateMessages(msgs, feed, false, &m_mutexDb);
auto updated_messages = acc->updateMessages(msgs, feed, false, nullptr);
qDebugNN << LOGSEC_FEEDDOWNLOADER << "Updating messages in DB took" << NONQUOTE_W_SPACE(tmr.nsecsElapsed() / 1000)
<< "microseconds.";

View File

@ -53,9 +53,12 @@ QList<QAction*> StandardFeed::contextMenuFeedsList() {
}
QString StandardFeed::additionalTooltip() const {
return Feed::additionalTooltip() + tr("\nEncoding: %2\n"
"Type: %3")
.arg(encoding(), StandardFeed::typeToString(type()));
return Feed::additionalTooltip() + tr("\nEncoding: %1\n"
"Type: %2\n"
"Post-processing script: %3")
.arg(encoding(),
StandardFeed::typeToString(type()),
m_postProcessScript.isEmpty() ? QSL("-") : m_postProcessScript);
}
bool StandardFeed::canBeDeleted() const {