From e08e2396f5a6dcee11a152c375f6f756ecd5502e Mon Sep 17 00:00:00 2001 From: 112batuhan Date: Sun, 8 Dec 2024 19:06:29 +0300 Subject: [PATCH] fix: fixing activity queue order --- src/handlers/activity.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlers/activity.rs b/src/handlers/activity.rs index b98b93d..32c3449 100644 --- a/src/handlers/activity.rs +++ b/src/handlers/activity.rs @@ -152,9 +152,9 @@ impl ActivityTracker { pub fn add_new_activity_to_queue(&self, new_activity: Activity) -> Result<(), AppError> { let mut locked_queue = self.lock_activity_queue()?; - locked_queue.push_front(new_activity); + locked_queue.push_back(new_activity); if locked_queue.len() > self.queue_size.into() { - locked_queue.pop_back(); + locked_queue.pop_front(); } Ok(()) }