]> git.mxchange.org Git - friendica.git/commitdiff
Switch to daily after a week
authorMichael <heluecht@pirati.ca>
Sun, 16 Aug 2020 18:05:34 +0000 (18:05 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 16 Aug 2020 18:05:34 +0000 (18:05 +0000)
src/Protocol/Feed.php

index 61ef84680068260c423e8f8cb31700ac3e3bf9da..9ba2089c13af5a49114d02e84f534be015a2fb2d 100644 (file)
@@ -665,12 +665,12 @@ class Feed
                                return;                         
                        }
 
-                       if (((time() / 86400) - $newest) > 30) {
-                               Logger::info('Feed had not posted for a month, switching to daily polling', ['newest' => $newest_date, 'id' => $contact['id'], 'uid' => $contact['uid'], 'url' => $contact['url']]);
+                       if (empty($frequency)) {
+                               Logger::info('Feed had not posted for at least a week, switching to daily polling', ['newest' => $newest_date, 'id' => $contact['id'], 'uid' => $contact['uid'], 'url' => $contact['url']]);
                                $priority = 3; // Poll once a day
                        }
 
-                       if (count($creation_dates) == 1) {
+                       if (empty($priority) && (count($creation_dates) == 1)) {
                                Logger::info('Feed had posted a single time, switching to daily polling', ['newest' => $newest_date, 'id' => $contact['id'], 'uid' => $contact['uid'], 'url' => $contact['url']]);
                                $priority = 3; // Poll once a day
                        }