Explorar el Código

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.
Alexandre Alapetite hace 6 años
padre
commit
946d9f5535
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      app/Controllers/feedController.php

+ 1 - 1
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();
 			}