feat(proxy): add batching to cancellation queue processing (#10607)

Add batching to the redis queue, which allows us to clear it out quicker
should it slow down temporarily.
This commit is contained in:
Conrad Ludgate
2025-04-12 10:16:22 +01:00
committed by GitHub
parent d109bf8c1d
commit 946e971df8
3 changed files with 192 additions and 209 deletions

View File

@@ -509,7 +509,14 @@ pub async fn run() -> anyhow::Result<()> {
if let Some(mut redis_kv_client) = redis_kv_client {
maintenance_tasks.spawn(async move {
redis_kv_client.try_connect().await?;
handle_cancel_messages(&mut redis_kv_client, rx_cancel).await
handle_cancel_messages(&mut redis_kv_client, rx_cancel).await?;
drop(redis_kv_client);
// `handle_cancel_messages` was terminated due to the tx_cancel
// being dropped. this is not worthy of an error, and this task can only return `Err`,
// so let's wait forever instead.
std::future::pending().await
});
}