Do not use transactions for DB reads

Otherwise this will block the DB for other actions.  SQLITE should
always allow reads regardless of other ongoing actions/transactions (or
at least in WAL mode if I remember correctly).
This commit is contained in:
Bart De Vries 2023-11-05 10:50:49 +01:00
parent 73420571d7
commit 7dd5d33caa
1 changed files with 0 additions and 3 deletions

View File

@ -117,8 +117,6 @@ void UpdateFeedJob::processFeed(Syndication::FeedPtr feed)
// Retrieve "other" fields; this will include the "itunes" tags // Retrieve "other" fields; this will include the "itunes" tags
QMultiMap<QString, QDomElement> otherItems = feed->additionalProperties(); QMultiMap<QString, QDomElement> otherItems = feed->additionalProperties();
Database::transaction(m_url);
query.prepare(QStringLiteral( query.prepare(QStringLiteral(
"UPDATE Feeds SET name=:name, image=:image, link=:link, description=:description, lastUpdated=:lastUpdated, dirname=:dirname WHERE url=:url;")); "UPDATE Feeds SET name=:name, image=:image, link=:link, description=:description, lastUpdated=:lastUpdated, dirname=:dirname WHERE url=:url;"));
query.bindValue(QStringLiteral(":name"), feed->title()); query.bindValue(QStringLiteral(":name"), feed->title());
@ -160,7 +158,6 @@ void UpdateFeedJob::processFeed(Syndication::FeedPtr feed)
// Do the actual database UPDATE of this feed // Do the actual database UPDATE of this feed
Database::execute(query); Database::execute(query);
Database::commit(m_url);
// Now that we have the feed details, we make vectors of the data that's // Now that we have the feed details, we make vectors of the data that's
// already in the database relating to this feed // already in the database relating to this feed