1
0
Fork 0

Merge pull request #6825 from annando/empty-spawn

Worker: Don't spawn without jobs
This commit is contained in:
Tobias Diekershoff 2019-03-08 07:26:22 +01:00 committed by GitHub
commit 5df246e9af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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];