From 6c663919880f49738b502e051686601af7cb5079 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 25 Nov 2024 06:47:20 +0000 Subject: [PATCH] fix unnecessary serialization of sender query keys Signed-off-by: Jason Volk --- src/service/sending/data.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/service/sending/data.rs b/src/service/sending/data.rs index ca7ca19a..118dab91 100644 --- a/src/service/sending/data.rs +++ b/src/service/sending/data.rs @@ -103,8 +103,9 @@ impl Data { pub fn active_requests_for(&self, destination: &Destination) -> impl Stream + Send + '_ { let prefix = destination.get_prefix(); self.servercurrentevent_data - .stream_prefix_raw(&prefix) + .raw_stream_from(&prefix) .ignore_err() + .ready_take_while(move |(key, _)| key.starts_with(&prefix)) .map(|(key, val)| { let (_, event) = parse_servercurrentevent(key, val).expect("invalid servercurrentevent"); @@ -152,8 +153,9 @@ impl Data { pub fn queued_requests(&self, destination: &Destination) -> impl Stream + Send + '_ { let prefix = destination.get_prefix(); self.servernameevent_data - .stream_prefix_raw(&prefix) + .raw_stream_from(&prefix) .ignore_err() + .ready_take_while(move |(key, _)| key.starts_with(&prefix)) .map(|(key, val)| { let (_, event) = parse_servercurrentevent(key, val).expect("invalid servercurrentevent");