mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Fix typo
This commit is contained in:
parent
2b3a8527ff
commit
9a6c4c5ebe
1 changed files with 3 additions and 3 deletions
|
|
@ -686,12 +686,12 @@ App::get('/v1/health/queue/functions')
|
||||||
contentType: ContentType::JSON
|
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)
|
->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')
|
->inject('response')
|
||||||
->action(function (int|string $threshold, Publisher $publisherForFunctions, Response $response) {
|
->action(function (int|string $threshold, Publisher $publisherFunctions, Response $response) {
|
||||||
$threshold = \intval($threshold);
|
$threshold = \intval($threshold);
|
||||||
|
|
||||||
$size = $publisherForFunctions->getQueueSize(new Queue(Event::FUNCTIONS_QUEUE_NAME));
|
$size = $publisherFunctions->getQueueSize(new Queue(Event::FUNCTIONS_QUEUE_NAME));
|
||||||
|
|
||||||
if ($size >= $threshold) {
|
if ($size >= $threshold) {
|
||||||
throw new Exception(Exception::HEALTH_QUEUE_SIZE_EXCEEDED, "Queue size threshold hit. Current size is {$size} and threshold is {$threshold}.");
|
throw new Exception(Exception::HEALTH_QUEUE_SIZE_EXCEEDED, "Queue size threshold hit. Current size is {$size} and threshold is {$threshold}.");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue