Skip to content

Commit

Permalink
fixup! use pagination to get all queues. Make checking for which queu…
Browse files Browse the repository at this point in the history
…es to delete much quicker by reading .queue files instead of computing SHA1 where possible
  • Loading branch information
viktorerlingsson committed Jan 10, 2025
1 parent 1dbef7e commit 7538f3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lavinmqctl.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7538f3c

Please sign in to comment.