From b958b831a797bd96a12f896e9411a50d18fd12b3 Mon Sep 17 00:00:00 2001 From: "Tarvo R." Date: Thu, 21 Dec 2023 11:55:06 +0200 Subject: [PATCH] Fix displatches typo --- config/google-cloud-queues.php | 6 +++--- src/Client.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/google-cloud-queues.php b/config/google-cloud-queues.php index 59ef2bf..aacfa6d 100644 --- a/config/google-cloud-queues.php +++ b/config/google-cloud-queues.php @@ -9,7 +9,7 @@ 'rate_limits' => [ 'max_burst_size' => 10, 'max_concurrent_dispatches' => 10, - 'max_displatches_per_second' => 10, + 'max_dispatches_per_second' => 10, ], 'retry_config' => [ 'max_attempts' => 5, @@ -25,7 +25,7 @@ // 'rate_limits' => [ // 'max_burst_size' => 10, // 'max_concurrent_dispatches' => 75, - // 'max_displatches_per_second' => 20, + // 'max_dispatches_per_second' => 20, // ], // 'retry_config' => [ // 'max_attempts' => 5, @@ -39,4 +39,4 @@ 'name' => 'queue2', ], ], -]; \ No newline at end of file +]; diff --git a/src/Client.php b/src/Client.php index 11f9873..4e0ae27 100644 --- a/src/Client.php +++ b/src/Client.php @@ -55,7 +55,7 @@ public function updateQueue($queueName, $options) $rateLimits = new RateLimits; $rateLimits->setMaxBurstSize($options['rate_limits']['max_burst_size']); $rateLimits->setMaxConcurrentDispatches($options['rate_limits']['max_concurrent_dispatches']); - $rateLimits->setMaxDispatchesPerSecond($options['rate_limits']['max_displatches_per_second']); + $rateLimits->setMaxDispatchesPerSecond($options['rate_limits']['max_dispatches_per_second'] ?? $options['rate_limits']['max_displatches_per_second']); $queue->setRateLimits($rateLimits); $retryConfig = new RetryConfig; @@ -68,4 +68,4 @@ public function updateQueue($queueName, $options) $this->client->updateQueue($queue); } -} \ No newline at end of file +}