Skip to content

Commit

Permalink
修复
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft committed Oct 11, 2023
1 parent 376b71d commit ae2d16a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Components/rate-limit/src/RateLimiter.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public static function getTokens(string $name, int $capacity, ?int $fill = null,
$storage = new ImiRedisStorage($name, RedisManager::getInstance($poolName));
$rate = new Rate($fill ?? $capacity, $unit);
$bucket = new TokenBucket($capacity, $rate, $storage);
$bucket->bootstrap($capacity);

Check warning on line 120 in src/Components/rate-limit/src/RateLimiter.php

View check run for this annotation

Codecov / codecov/patch

src/Components/rate-limit/src/RateLimiter.php#L117-L120

Added lines #L117 - L120 were not covered by tests

return $bucket->getTokens();

Check warning on line 122 in src/Components/rate-limit/src/RateLimiter.php

View check run for this annotation

Codecov / codecov/patch

src/Components/rate-limit/src/RateLimiter.php#L122

Added line #L122 was not covered by tests
}
Expand Down

0 comments on commit ae2d16a

Please sign in to comment.