Skip to content

Commit

Permalink
Implement distributed rate-limiting
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Oct 25, 2024
1 parent cb790b7 commit 165f618
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class DistributedRateLimiter(proxyManager: ProxyManager<String>) : RequestRateLi
val proxy = proxyManager.getProxy(globalBucket) { CompletableFuture.completedFuture(config) }
proxy.replaceConfiguration(config, TokensInheritanceStrategy.AS_IS)
} else {
val key = response.bucketKey!!
val key = response.bucketKey ?: return
val config = response.toBucketConfiguration()
val proxy = proxyManager.getProxy(key.value) { CompletableFuture.completedFuture(config) }
proxy.replaceConfiguration(config, TokensInheritanceStrategy.AS_IS)
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ coroutines = "1.9.0"
serialization = "1.7.3"
ktor = "3.0.0"
kord = "feature-user-apps-20241022.210712-8"
api = "3.37.10"
api = "3.37.11"
ksp = "2.0.21-1.0.25"
lavakord = "7.1.0"

Expand Down

0 comments on commit 165f618

Please sign in to comment.