summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2015-05-16 23:44:36 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2015-05-16 23:44:36 +0200
commit84ea636d2d8c55e04d0c2d07688b66d7730b6c7c (patch)
tree02ae67aea27bba02d259b80ae23a3d9815fc1692
parenta5a3789b2c86ddef3c6d0e982019c3b9108b2a15 (diff)
PubSubHubbub bug skip pull
Do not pull refresh feeds that are PubSubHubbub too often during cron refresh. And more debugging info during the test phase. https://github.com/FreshRSS/FreshRSS/pull/831
-rwxr-xr-xapp/Controllers/feedController.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index dfdf0dc16..5e845027f 100755
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -300,8 +300,13 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
$updated_feeds = 0;
$is_read = FreshRSS_Context::$user_conf->mark_when['reception'] ? 1 : 0;
foreach ($feeds as $feed) {
+ $url = $feed->url(); //For detection of HTTP 301
+
$pubSubHubbubEnabled = $feed->pubSubHubbubEnabled();
- if ((!$simplePiePush) && (!$id) && (!$force) && $pubSubHubbubEnabled && ($feed->lastUpdate() > $pshbMinAge)) {
+ if ((!$simplePiePush) && (!$id) && $pubSubHubbubEnabled && ($feed->lastUpdate() > $pshbMinAge)) {
+ $text = 'Skip pull of feed using PubSubHubbub: ' . $url;
+ Minz_Log::debug($text);
+ file_put_contents(USERS_PATH . '/_/log_pshb.txt', date('c') . "\t" . $text . "\n", FILE_APPEND);
continue; //When PubSubHubbub is used, do not pull refresh so often
}
@@ -310,7 +315,6 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
continue;
}
- $url = $feed->url(); //For detection of HTTP 301
try {
if ($simplePiePush) {
$feed->loadEntries($simplePiePush); //Used by PubSubHubbub