From 7538f3ccfec8d008d23c71b89c8645c41debde56 Mon Sep 17 00:00:00 2001 From: Viktor Erlingsson Date: Fri, 10 Jan 2025 14:53:28 +0100 Subject: [PATCH] fixup! use pagination to get all queues. Make checking for which queues to delete much quicker by reading .queue files instead of computing SHA1 where possible --- src/lavinmqctl.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lavinmqctl.cr b/src/lavinmqctl.cr index 30cdfb94b3..df46e6d2e5 100644 --- a/src/lavinmqctl.cr +++ b/src/lavinmqctl.cr @@ -717,10 +717,10 @@ class LavinMQCtl rescue e : File::NotFoundError end - queues = get("/api/queues/#{URI.encode_www_form(current_vhost)}","name") + queues = get("/api/queues/#{URI.encode_www_form(current_vhost)}", "name") Dir.glob("#{vhost_data_dir}/*/.queue").each do |dir| - queues.delete({ "name"=> File.read(dir) }) + queues.delete({"name" => File.read(dir)}) queue_dirs.delete(dir[0..-8]) end