diff options
| author | 2020-04-14 00:09:13 +0200 | |
|---|---|---|
| committer | 2020-04-14 00:09:13 +0200 | |
| commit | 946d9f5535ddc62fb667edd27e57bde419586e23 (patch) | |
| tree | 09e5299da41065c02cbadce361e569c2bf8b1f4a /app/Controllers/feedController.php | |
| parent | f2e0f051aa52fcf189840ef4b1f5d7dc1ee087f5 (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-x | app/Controllers/feedController.php | 2 |
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(); } |
