lemmy/crates/api_common/src
dullbananas a14657d124
Refactor rate limiter and improve rate limit bucket cleanup (#3937)
* Update rate_limiter.rs

* Update mod.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update mod.rs

* Update scheduled_tasks.rs

* Shrink `RateLimitBucket`

* Update rate_limiter.rs

* Update mod.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update mod.rs

* Update rate_limiter.rs

* fmt

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* rerun ci

* Update rate_limiter.rs

* Undo changes to  fields

* Manually undo changes to RateLimitBucket fields

* fmt

* Bucket cleanup loop in rate_limit/mod.rs

* Remove rate limit bucket cleanup from scheduled_tasks.rs

* Remove ;

* Remove UNINITIALIZED_TOKEN_AMOUNT

* Update rate_limiter.rs

* fmt

* Update rate_limiter.rs

* fmt

* Update rate_limiter.rs

* fmt

* Update rate_limiter.rs

* stuff

* MapLevel trait

* fix merge

* Prevent negative numbers in buckets

* Clean up MapLevel::check

* MapLevel::remove_full_buckets

* stuff

* Use remove_full_buckets to avoid allocations

* stuff

* remove tx

* Remove RateLimitConfig

* Rename settings_updated_channel to rate_limit_cell

* Remove global rate limit cell

* impl Default for RateLimitCell

* bucket_configs doc comment to explain EnumMap

* improve test_rate_limiter

* rename default to with_test_config

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
2023-10-19 15:31:51 +02:00
..
build_response.rs Cleanup checks for community actions (fixes #2858, fixes #2868) (#4028) 2023-10-13 09:48:18 -04:00
claims.rs Refactor rate limiter and improve rate limit bucket cleanup (#3937) 2023-10-19 15:31:51 +02:00
comment.rs Remove explicit auth params (#3946) 2023-09-21 06:42:28 -04:00
community.rs Handle invalid ban expires values (fixes #4045) (#4046) 2023-10-17 13:25:35 -04:00
context.rs Refactor rate limiter and improve rate limit bucket cleanup (#3937) 2023-10-19 15:31:51 +02:00
custom_emoji.rs Remove explicit auth params (#3946) 2023-09-21 06:42:28 -04:00
lib.rs Add db table for login tokens which allows for invalidation (#3818) 2023-10-09 12:46:12 +02:00
person.rs Enable animated avatars setting (#4040) 2023-10-17 10:52:34 -04:00
post.rs Allow marking multiple posts as read in single api call (fixes #3963) (#4048) 2023-10-17 12:35:51 -04:00
private_message.rs Remove explicit auth params (#3946) 2023-09-21 06:42:28 -04:00
request.rs Add logging for pictrs uploads (#3927) 2023-09-06 09:13:30 -04:00
send_activity.rs remove synchronous federation flag 2023-09-20 14:22:17 +00:00
sensitive.rs Upgrade api_test deps (#2850) 2023-05-10 16:31:37 -04:00
site.rs Remove explicit auth params (#3946) 2023-09-21 06:42:28 -04:00
utils.rs Refactor rate limiter and improve rate limit bucket cleanup (#3937) 2023-10-19 15:31:51 +02:00