aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2021-03-07 17:34:47 +0100
committerGravatar GitHub <noreply@github.com> 2021-03-07 17:34:47 +0100
commitb10cd770eeca5520d9beb5e4e2f1a85bfcb75a9b (patch)
tree30bf1165ad6f220a4da1a518c1f911dd155a07a2 /app/Controllers
parent51ed59dcc6825469a5235503dd6fa81b0f7baf41 (diff)
SQLite: fix updateEntry (#3461)
* Draft of fix for updateEntry #fix https://github.com/FreshRSS/FreshRSS/issues/3130 * Fix for SQLite * Update app/Models/EntryDAO.php Fixed in https://github.com/FreshRSS/FreshRSS/pull/3500 * Unbuffered streaming only for MySQL
Diffstat (limited to 'app/Controllers')
-rwxr-xr-xapp/Controllers/feedController.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index 158015d2b..25bada492 100755
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -733,10 +733,18 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
//Extract all feed entries from database, load complete content and store them back in database.
$entries = $entryDAO->listWhere('f', $feed_id, FreshRSS_Entry::STATE_ALL, 'DESC', 0);
+ //TODO: Parameter to limit the number of articles to reload
- //We need another DB connection in parallel
+ //We need another DB connection in parallel for unbuffered streaming
Minz_ModelPdo::$usesSharedPdo = false;
- $entryDAO2 = FreshRSS_Factory::createEntryDao();
+ if (FreshRSS_Context::$system_conf->db['type'] === 'mysql') {
+ // Second parallel connection for unbuffered streaming: MySQL
+ $entryDAO2 = FreshRSS_Factory::createEntryDao();
+ } else {
+ // Single connection for buffered queries (in memory): SQLite, PostgreSQL
+ //TODO: Consider an unbuffered query for PostgreSQL
+ $entryDAO2 = $entryDAO;
+ }
foreach ($entries as $entry) {
if ($entry->loadCompleteContent(true)) {