From 47e1013700109a3f535468b3eec3cc750e035add Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Mon, 9 Mar 2026 19:43:47 -0300 Subject: [PATCH] Fix Redis BLPOP return type: handle (key, value) tuple --- src/core/bot/channels/whatsapp_queue.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/bot/channels/whatsapp_queue.rs b/src/core/bot/channels/whatsapp_queue.rs index 29d1b2b8..3cd3777c 100644 --- a/src/core/bot/channels/whatsapp_queue.rs +++ b/src/core/bot/channels/whatsapp_queue.rs @@ -76,9 +76,10 @@ impl WhatsAppMessageQueue { async fn process_next(&self) -> Result<(), Box> { let mut conn = self.redis_client.get_multiplexed_async_connection().await?; - let result: Option = conn.blpop(Self::QUEUE_KEY, 5.0).await?; + // BLPOP returns (key, value) tuple + let result: Option<(String, String)> = conn.blpop(Self::QUEUE_KEY, 5.0).await?; - if let Some(json) = result { + if let Some((_key, json)) = result { let msg: QueuedWhatsAppMessage = serde_json::from_str(&json)?; // Check and enforce rate limit for this recipient