mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-10 18:22:49 +02:00
delete a bad event rate limiter (bad, do not use)
This commit is contained in:
parent
423ca4e664
commit
91fed80d4f
1 changed files with 0 additions and 24 deletions
|
@ -70,30 +70,6 @@ where
|
||||||
|
|
||||||
let mut events_all = HashSet::with_capacity(todo_auth_events.len());
|
let mut events_all = HashSet::with_capacity(todo_auth_events.len());
|
||||||
while let Some(next_id) = todo_auth_events.pop_front() {
|
while let Some(next_id) = todo_auth_events.pop_front() {
|
||||||
if let Some((time, tries)) = self
|
|
||||||
.services
|
|
||||||
.globals
|
|
||||||
.bad_event_ratelimiter
|
|
||||||
.read()
|
|
||||||
.get(&*next_id)
|
|
||||||
{
|
|
||||||
// Exponential backoff
|
|
||||||
const MIN_DURATION: u64 = 60 * 2;
|
|
||||||
const MAX_DURATION: u64 = 60 * 60;
|
|
||||||
if continue_exponential_backoff_secs(
|
|
||||||
MIN_DURATION,
|
|
||||||
MAX_DURATION,
|
|
||||||
time.elapsed(),
|
|
||||||
*tries,
|
|
||||||
) {
|
|
||||||
debug_warn!(
|
|
||||||
tried = ?*tries,
|
|
||||||
elapsed = ?time.elapsed(),
|
|
||||||
"Backing off from {next_id}",
|
|
||||||
);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if events_all.contains(&next_id) {
|
if events_all.contains(&next_id) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue