mirror of
https://github.com/friendica/friendica
synced 2025-04-28 11:04:22 +02:00
The priority is now a class constant
This commit is contained in:
parent
b33b70f0ab
commit
018858934b
46 changed files with 148 additions and 151 deletions
|
@ -552,7 +552,7 @@ class Processor
|
|||
Logger::notice('Fetching is done by worker.', ['parent' => $activity['reply-to-id'], 'recursion-depth' => $recursion_depth]);
|
||||
Fetch::add($activity['reply-to-id']);
|
||||
$activity['recursion-depth'] = 0;
|
||||
$wid = Worker::add(PRIORITY_HIGH, 'FetchMissingActivity', $activity['reply-to-id'], $activity, '', Receiver::COMPLETION_AUTO);
|
||||
$wid = Worker::add(Worker::PRIORITY_HIGH, 'FetchMissingActivity', $activity['reply-to-id'], $activity, '', Receiver::COMPLETION_AUTO);
|
||||
Fetch::setWorkerId($activity['reply-to-id'], $wid);
|
||||
} else {
|
||||
Logger::debug('Activity will already be fetched via a worker.', ['url' => $activity['reply-to-id']]);
|
||||
|
@ -1665,9 +1665,9 @@ class Processor
|
|||
}
|
||||
if (DI::config()->get('system', 'bulk_delivery')) {
|
||||
Post\Delivery::add($post['uri-id'], $uid, $inbox, $post['created'], Delivery::POST, [$cid]);
|
||||
Worker::add(PRIORITY_HIGH, 'APDelivery', '', 0, $inbox, 0);
|
||||
Worker::add(Worker::PRIORITY_HIGH, 'APDelivery', '', 0, $inbox, 0);
|
||||
} else {
|
||||
Worker::add(PRIORITY_HIGH, 'APDelivery', Delivery::POST, $post['id'], $inbox, $uid, [$cid], $post['uri-id']);
|
||||
Worker::add(Worker::PRIORITY_HIGH, 'APDelivery', Delivery::POST, $post['id'], $inbox, $uid, [$cid], $post['uri-id']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -652,7 +652,7 @@ class Receiver
|
|||
// We delay by 5 seconds to allow to accumulate all receivers
|
||||
$delayed = date(DateTimeFormat::MYSQL, time() + 5);
|
||||
Logger::debug('Initiate processing', ['id' => $object_data['entry-id'], 'uri' => $object_data['object_id']]);
|
||||
$wid = Worker::add(['priority' => PRIORITY_HIGH, 'delayed' => $delayed], 'ProcessQueue', $object_data['entry-id']);
|
||||
$wid = Worker::add(['priority' => Worker::PRIORITY_HIGH, 'delayed' => $delayed], 'ProcessQueue', $object_data['entry-id']);
|
||||
Queue::setWorkerId($object_data['entry-id'], $wid);
|
||||
} else {
|
||||
Logger::debug('Other queue entries need to be processed first.', ['id' => $object_data['entry-id']]);
|
||||
|
|
|
@ -2020,7 +2020,7 @@ class Diaspora
|
|||
}
|
||||
|
||||
Logger::info('Deliver participation', ['item' => $comment['id'], 'contact' => $author_contact['cid']]);
|
||||
if (Worker::add(PRIORITY_HIGH, 'Delivery', Delivery::POST, $comment['uri-id'], $author_contact['cid'], $datarray['uid'])) {
|
||||
if (Worker::add(Worker::PRIORITY_HIGH, 'Delivery', Delivery::POST, $comment['uri-id'], $author_contact['cid'], $datarray['uid'])) {
|
||||
Post\DeliveryData::incrementQueueCount($comment['uri-id'], 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ use Friendica\Content\Text\HTML;
|
|||
use Friendica\Core\Cache\Enum\Duration;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
|
@ -630,7 +631,7 @@ class Feed
|
|||
unset($item['parent-uri']);
|
||||
|
||||
// Set the delivery priority for "remote self" to "medium"
|
||||
$notify = PRIORITY_MEDIUM;
|
||||
$notify = Worker::PRIORITY_MEDIUM;
|
||||
}
|
||||
|
||||
$condition = ['uid' => $item['uid'], 'uri' => $item['uri']];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue