use Friendica\Core\Protocol;
use Friendica\Database\DBA;
use Friendica\Model\Queue;
+use Friendica\Core\Worker;
function diaspora_install()
{
$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);
}
}
}
$s = serialize(['url' => $url, 'item' => $b['id'], 'post' => $params]);
- Queue::add($a->contact, Protocol::PUMPIO, $s);
- notice(L10n::t('Pump.io post failed. Queued for retry.').EOL);
+ Worker::defer();
+ notice(L10n::t('Pump.io post failed. Deferred for retry.').EOL);
}
}
}
$s = serialize(['url' => $url, 'item' => $orig_post["id"], 'post' => $params]);
- Queue::add($a->contact, Protocol::PUMPIO, $s);
- notice(L10n::t('Pump.io like failed. Queued for retry.').EOL);
+ Worker::defer();
+ notice(L10n::t('Pump.io like failed. Deferred for retry.').EOL);
}
}
$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']]);