diff --git a/app/Services/ActivityPubDeliveryService.php b/app/Services/ActivityPubDeliveryService.php index aac3da0b8..bd9a6afc7 100644 --- a/app/Services/ActivityPubDeliveryService.php +++ b/app/Services/ActivityPubDeliveryService.php @@ -374,7 +374,8 @@ class ActivityPubDeliveryService 'body' => $payload, ]); } - } + }, + self::concurrency() ); $deliveriesByIndex = []; @@ -486,6 +487,14 @@ class ActivityPubDeliveryService return $result; } + private static function concurrency(): int + { + return max( + 1, + (int) config('federation.activitypub.delivery.concurrency', 10) + ); + } + /** * Validate that the profile is a local, active profile that may be used * to sign outgoing ActivityPub requests.