Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jakedouglas/333284 to your computer and use it in GitHub Desktop.
Save jakedouglas/333284 to your computer and use it in GitHub Desktop.
From fad73fe62f2f7754ebd087283326c015d6dfe810 Mon Sep 17 00:00:00 2001
From: Jake Douglas <jakecdouglas@gmail.com>
Date: Mon, 15 Mar 2010 13:26:14 -0700
Subject: [PATCH] Remove a queue from MQ#queues on CancelOk if it is autodelete
---
lib/mq/queue.rb | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/mq/queue.rb b/lib/mq/queue.rb
index 1bdb63c..a1bd809 100644
--- a/lib/mq/queue.rb
+++ b/lib/mq/queue.rb
@@ -424,6 +424,7 @@ class MQ
@on_cancel.call if @on_cancel
@on_cancel = @on_msg = nil
@mq.consumers.delete @consumer_tag
+ @mq.queues.delete(@name) if @opts[:auto_delete]
@consumer_tag = nil
end
--
1.6.4.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment