From c3dadcfd1d45eb9e60bbe2ade40fac81ede5ad17 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Tue, 23 Sep 2025 23:33:06 -0400 Subject: [PATCH] longer delay between IP ban polls (we use cloudflare now anyway) --- .../web/storyteller_web/src/threads/poll_ip_banlist_thread.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/service/web/storyteller_web/src/threads/poll_ip_banlist_thread.rs b/crates/service/web/storyteller_web/src/threads/poll_ip_banlist_thread.rs index 0fa7b0e85f..99984a172d 100644 --- a/crates/service/web/storyteller_web/src/threads/poll_ip_banlist_thread.rs +++ b/crates/service/web/storyteller_web/src/threads/poll_ip_banlist_thread.rs @@ -11,6 +11,8 @@ use mysql_queries::queries::ip_bans::list_ip_bans::list_ip_bans; const DYNAMIC_BAN_LIST_NAME : &str = "DYNAMIC_POLLING_IP_BAN_LIST"; +const WAIT_BETWEEN_POLLS_MILLIS: u64 = 1_000 * 60 * 5; // 5 minutes + pub async fn poll_ip_bans( ip_ban_list: IpBanList, mysql_pool: MySqlPool, @@ -48,6 +50,6 @@ pub async fn poll_ip_bans( }, } - tokio::time::sleep(Duration::from_millis(20_000)).await; + tokio::time::sleep(Duration::from_millis(WAIT_BETWEEN_POLLS_MILLIS)).await; } }