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.
pull/2880/head^2
Alexandre Alapetite 5 years ago committed by GitHub
parent f2e0f051aa
commit 946d9f5535
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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();
}

Loading…
Cancel
Save