Added configuration for the bulk delivery
This commit is contained in:
parent
6e394ac6ff
commit
3163760343
|
@ -786,10 +786,17 @@ class Notifier
|
|||
|
||||
Logger::info('Delivery via ActivityPub', ['cmd' => $cmd, 'id' => $target_item['id'], 'inbox' => $inbox]);
|
||||
|
||||
if (Worker::add(['priority' => $priority, 'created' => $created, 'dont_fork' => true],
|
||||
'APDelivery', $cmd, 0, $inbox, $uid)) {
|
||||
$delivery_queue_count++;
|
||||
Post\Delivery::add($target_item['uri-id'], $uid, $inbox, $target_item['created'], $cmd);
|
||||
if (DI::config()->get('system', 'bulk_delivery')) {
|
||||
if (Worker::add(['priority' => $priority, 'created' => $created, 'dont_fork' => true],
|
||||
'APDelivery', $cmd, 0, $inbox, $uid)) {
|
||||
$delivery_queue_count++;
|
||||
Post\Delivery::add($target_item['uri-id'], $uid, $inbox, $target_item['created'], $cmd);
|
||||
}
|
||||
} else {
|
||||
if (Worker::add(['priority' => $priority, 'created' => $created, 'dont_fork' => true],
|
||||
'APDelivery', $cmd, $target_item['id'], $inbox, $uid, $receivers, $target_item['uri-id'])) {
|
||||
$delivery_queue_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -797,9 +804,15 @@ class Notifier
|
|||
foreach ($relay_inboxes as $inbox) {
|
||||
Logger::info('Delivery to relay servers via ActivityPub', ['cmd' => $cmd, 'id' => $target_item['id'], 'inbox' => $inbox]);
|
||||
|
||||
if (Worker::add(['priority' => $priority, 'dont_fork' => true], 'APDelivery', $cmd, 0, $inbox, $uid)) {
|
||||
$delivery_queue_count++;
|
||||
Post\Delivery::add($target_item['uri-id'], $uid, $inbox, $target_item['created'], $cmd);
|
||||
if (DI::config()->get('system', 'bulk_delivery')) {
|
||||
if (Worker::add(['priority' => $priority, 'dont_fork' => true], 'APDelivery', $cmd, 0, $inbox, $uid)) {
|
||||
$delivery_queue_count++;
|
||||
Post\Delivery::add($target_item['uri-id'], $uid, $inbox, $target_item['created'], $cmd);
|
||||
}
|
||||
} else {
|
||||
if (Worker::add(['priority' => $priority, 'dont_fork' => true], 'APDelivery', $cmd, $target_item['id'], $inbox, $uid, [], $target_item['uri-id'])) {
|
||||
$delivery_queue_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -122,6 +122,10 @@ return [
|
|||
// Display "Emoji Only" posts in big.
|
||||
'big_emojis' => false,
|
||||
|
||||
// bulk_delivery (Boolean)
|
||||
// Delivers AP messages in a bulk (experimental)
|
||||
'bulk_delivery' => false,
|
||||
|
||||
// block_local_dir (Boolean)
|
||||
// Deny public access to the local user directory.
|
||||
'block_local_dir' => false,
|
||||
|
|
Loading…
Reference in a new issue