Worker: Don't spawn without jobs

This commit is contained in:
Michael 2019-03-08 05:53:36 +00:00
parent a911baf8e5
commit d87abe9563
2 changed files with 4 additions and 3 deletions

View file

@ -446,7 +446,8 @@ class Notifier
// Ensure that posts with our own protocol arrives before Diaspora posts arrive.
// Situation is that sometimes Friendica servers receive Friendica posts over the Diaspora protocol first.
// The conversion in Markdown reduces the formatting, so these posts should arrive after the Friendica posts.
if ($rr['network'] == Protocol::DIASPORA) {
// This is only important for high and medium priority tasks and not for Low priority jobs like deletions.
if (($rr['network'] == Protocol::DIASPORA) && in_array($a->queue['priority'], [PRIORITY_HIGH, PRIORITY_MEDIUM])) {
$deliver_options = ['priority' => $a->queue['priority'], 'dont_fork' => true];
} else {
$deliver_options = ['priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true];