From d0f45c4ecb192ea54313ec82dc13990a0c1041b5 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 30 Nov 2020 09:59:29 +0100 Subject: [PATCH] Fixed function name and variable --- src/Protocol/Feed.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index 0c945a180..523110714 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -619,7 +619,7 @@ class Feed $total = count($postings); if ($total > 1) { // Posts shouldn't be delayed more than a day - $interval = max(1440, self::getPollInterval($contact)); + $interval = min(1440, self::getPollInterval($contact)); $delay = round(($interval * 60) / $total); Logger::notice('Got posting delay', ['delay' => $delay, 'interval' => $interval, 'items' => $total, 'cid' => $contact['id'], 'url' => $contact['url']]); } else { @@ -635,7 +635,7 @@ class Feed $post_delay += $delay; } - Worker::add(['priority' => PRIORITY_HIGH, 'delayed' => $post_delay], + Worker::add(['priority' => PRIORITY_HIGH, 'delayed' => $publish_at], 'DelayedPublish', $posting['item'], $posting['notify'], $posting['taglist'], $posting['attachments']); } }