diff --git a/app/controllers/api/health.php b/app/controllers/api/health.php index b86ed286f2..32b77433f0 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -686,12 +686,12 @@ App::get('/v1/health/queue/functions') contentType: ContentType::JSON )) ->param('threshold', 5000, new Integer(true), 'Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.', true) - ->inject('publisherForFunctions') + ->inject('publisherFunctions') ->inject('response') - ->action(function (int|string $threshold, Publisher $publisherForFunctions, Response $response) { + ->action(function (int|string $threshold, Publisher $publisherFunctions, Response $response) { $threshold = \intval($threshold); - $size = $publisherForFunctions->getQueueSize(new Queue(Event::FUNCTIONS_QUEUE_NAME)); + $size = $publisherFunctions->getQueueSize(new Queue(Event::FUNCTIONS_QUEUE_NAME)); if ($size >= $threshold) { throw new Exception(Exception::HEALTH_QUEUE_SIZE_EXCEEDED, "Queue size threshold hit. Current size is {$size} and threshold is {$threshold}.");