mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-11 02:48:48 +00:00
Replace the "Queue" mechanism with deferred workers
This commit is contained in:
parent
f226a42443
commit
d6578733be
3 changed files with 9 additions and 8 deletions
|
@ -18,6 +18,7 @@ use Friendica\Core\PConfig;
|
|||
use Friendica\Core\Protocol;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\Queue;
|
||||
use Friendica\Core\Worker;
|
||||
|
||||
function diaspora_install()
|
||||
{
|
||||
|
@ -402,8 +403,8 @@ function diaspora_send(App $a, array &$b)
|
|||
|
||||
$s = serialize(['url' => $url, 'item' => $b['id'], 'post' => $body]);
|
||||
|
||||
Queue::add($a->contact, Protocol::DIASPORA2, $s);
|
||||
notice(L10n::t('Diaspora post failed. Queued for retry.').EOL);
|
||||
Worker::defer();
|
||||
notice(L10n::t('Diaspora post failed. Deferred for retry.').EOL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue