From 112dd37a09b121d00197173a24f9b5e41abcc63c Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 16 Aug 2020 18:05:34 +0000 Subject: [PATCH] Switch to daily after a week --- src/Protocol/Feed.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index 61ef846800..9ba2089c13 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -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 }