mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 00:48:55 +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
|
@ -692,8 +692,8 @@ function twitter_post_hook(App $a, array &$b)
|
|||
|
||||
$s = serialize(['url' => $url, 'item' => $b['id'], 'post' => $post]);
|
||||
|
||||
Queue::add($a->contact, Protocol::TWITTER, $s);
|
||||
notice(L10n::t('Twitter post failed. Queued for retry.') . EOL);
|
||||
Worker::defer();
|
||||
notice(L10n::t('Twitter post failed. Deferred for retry.') . EOL);
|
||||
} elseif ($iscomment) {
|
||||
Logger::log('twitter_post: Update extid ' . $result->id_str . " for post id " . $b['id']);
|
||||
Item::update(['extid' => "twitter::" . $result->id_str], ['id' => $b['id']]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue