Fixed function name and variable

This commit is contained in:
Michael Vogel 2020-11-30 09:59:29 +01:00
parent 6e06e0cf20
commit d0f45c4ecb

View file

@ -619,7 +619,7 @@ class Feed
$total = count($postings); $total = count($postings);
if ($total > 1) { if ($total > 1) {
// Posts shouldn't be delayed more than a day // 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); $delay = round(($interval * 60) / $total);
Logger::notice('Got posting delay', ['delay' => $delay, 'interval' => $interval, 'items' => $total, 'cid' => $contact['id'], 'url' => $contact['url']]); Logger::notice('Got posting delay', ['delay' => $delay, 'interval' => $interval, 'items' => $total, 'cid' => $contact['id'], 'url' => $contact['url']]);
} else { } else {
@ -635,7 +635,7 @@ class Feed
$post_delay += $delay; $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']); 'DelayedPublish', $posting['item'], $posting['notify'], $posting['taglist'], $posting['attachments']);
} }
} }