Skip to content

Commit

Permalink
rustdocs?
Browse files Browse the repository at this point in the history
alexsnaps committed Jul 2, 2024

Verified

This commit was signed with the committer’s verified signature.
alexsnaps Alex Snaps
1 parent f5fdd30 commit 1e5433c
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions limitador/src/lib.rs
Original file line number Diff line number Diff line change
@@ -36,13 +36,13 @@
//!
//! The definition of a limit includes:
//! - A namespace that identifies the resource to limit. It could be an API, a
//! Kubernetes service, a proxy ID, etc.
//! Kubernetes service, a proxy ID, etc.
//! - A value.
//! - The length of the period in seconds.
//! - Conditions that define when to apply the limit.
//! - A set of variables. For example, if we need to define the same limit for
//! each "user_id", instead of creating a limit for each hardcoded ID, we just
//! need to define "user_id" as a variable.
//! each "user_id", instead of creating a limit for each hardcoded ID, we just
//! need to define "user_id" as a variable.
//!
//! If we used Limitador in a context where it receives an HTTP request we could
//! define a limit like this to allow 10 requests per minute and per user_id
3 changes: 1 addition & 2 deletions limitador/src/storage/redis/redis_cached.rs
Original file line number Diff line number Diff line change
@@ -356,9 +356,8 @@ async fn flush_batcher_and_update_counters<C: ConnectionLike>(
update_counters(&mut redis_conn, counters)
})
.await
.map(|res| {
.inspect(|_| {
flip_partitioned(&partitioned, false);
res
})
.or_else(|(data, err)| {
if err.is_transient() {

0 comments on commit 1e5433c

Please sign in to comment.