From ccc4516a67f2b6789ae3d51d93dc5488a6f0c847 Mon Sep 17 00:00:00 2001 From: Arthur de Moulins Date: Sat, 16 Nov 2024 12:23:27 +0100 Subject: [PATCH] allow disable budgetLimit --- databox/api/src/Integration/ApiBudgetLimiter.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/databox/api/src/Integration/ApiBudgetLimiter.php b/databox/api/src/Integration/ApiBudgetLimiter.php index 3a6eac7d1..4b25e2846 100644 --- a/databox/api/src/Integration/ApiBudgetLimiter.php +++ b/databox/api/src/Integration/ApiBudgetLimiter.php @@ -40,6 +40,10 @@ public function createLimiter(int $limit, string $policy, string $interval, stri */ public function acceptIntegrationApiCall(IntegrationConfig $config, int $tokens = 1): void { + if (!$config['budgetLimit']['enabled']) { + return; + } + $limiter = $this->createLimiter( $config['budgetLimit']['limit'], $config['budgetLimit']['policy'],