aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/feedController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2020-04-14 00:09:13 +0200
committerGravatar GitHub <noreply@github.com> 2020-04-14 00:09:13 +0200
commit946d9f5535ddc62fb667edd27e57bde419586e23 (patch)
tree09e5299da41065c02cbadce361e569c2bf8b1f4a /app/Controllers/feedController.php
parentf2e0f051aa52fcf189840ef4b1f5d7dc1ee087f5 (diff)
Reduce DB locks (#2899)
Do not lock the DB to update it when there is nothing to commit. This should reduce the risk of seeing some `database is locked` errors.
Diffstat (limited to 'app/Controllers/feedController.php')
-rwxr-xr-xapp/Controllers/feedController.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index 43a6b7287..1f0d2d8ff 100755
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -462,7 +462,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
break;
}
}
- if (!$noCommit) {
+ if (!$noCommit && ($nb_new_articles > 0 || $updated_feeds > 0)) {
if (!$entryDAO->inTransaction()) {
$entryDAO->beginTransaction();
}