Skip to content

Commit

Permalink
allow disable budgetLimit
Browse files Browse the repository at this point in the history
  • Loading branch information
4rthem committed Nov 16, 2024
1 parent c35f32e commit ccc4516
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions databox/api/src/Integration/ApiBudgetLimiter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down

0 comments on commit ccc4516

Please sign in to comment.