mirror of
https://github.com/friendica/friendica
synced 2025-04-19 05:50:10 +00: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
|
@ -104,7 +104,7 @@ class Create extends BaseApi
|
|||
$item = ['network' => Protocol::DFRN, 'protocol' => Conversation::PARCEL_DIRECT, 'direction' => Conversation::PUSH];
|
||||
$item = Event::getItemArrayForId($event_id, $item);
|
||||
if (Item::insert($item)) {
|
||||
Worker::add(PRIORITY_HIGH, "Notifier", Delivery::POST, (int)$item['uri-id'], $uid);
|
||||
Worker::add(Worker::PRIORITY_HIGH, "Notifier", Delivery::POST, (int)$item['uri-id'], $uid);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ use Friendica\App\Router;
|
|||
use Friendica\Content\Text\Markdown;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
|
@ -204,7 +205,7 @@ class Statuses extends BaseApi
|
|||
if (!empty($request['scheduled_at'])) {
|
||||
$item['guid'] = Item::guid($item, true);
|
||||
$item['uri'] = Item::newURI($item['guid']);
|
||||
$id = Post\Delayed::add($item['uri'], $item, PRIORITY_HIGH, Post\Delayed::PREPARED, $request['scheduled_at']);
|
||||
$id = Post\Delayed::add($item['uri'], $item, Worker::PRIORITY_HIGH, Post\Delayed::PREPARED, $request['scheduled_at']);
|
||||
if (empty($id)) {
|
||||
DI::mstdnError()->InternalError();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue