lemmy/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
..
api_routes_http.rs Add validate_auth api endpoint (fixes #3702) (#4049) 2023-10-17 11:25:48 -04:00
code_migrations.rs chore: Run rust format 2023-09-22 21:39:03 -04:00
lib.rs Refactor rate limiter and improve rate limit bucket cleanup (#3937) 2023-10-19 15:31:51 +02:00
main.rs Persistent, performant, reliable federation queue (#3605) 2023-09-09 12:25:03 -04:00
prometheus_metrics.rs Cache & Optimize Woodpecker CI (#3450) 2023-07-17 11:04:14 -04:00
root_span_builder.rs Persistent, performant, reliable federation queue (#3605) 2023-09-09 12:25:03 -04:00
scheduled_tasks.rs Refactor rate limiter and improve rate limit bucket cleanup (#3937) 2023-10-19 15:31:51 +02:00
session_middleware.rs Refactor rate limiter and improve rate limit bucket cleanup (#3937) 2023-10-19 15:31:51 +02:00
telemetry.rs Extract Activitypub logic into separate library (#2288) 2022-06-02 16:33:41 +02:00