Module: Resque
- Defined in:
- lib/resqueue-metadata/resque_extend.rb,
lib/resqueue-metadata/metadata.rb
Overview
We have to monkey patch Resque directly to re-define the method. Including a module doesn’t work.
Defined Under Namespace
Classes: Queue
Instance Method Summary collapse
-
#original_remove_queue ⇒ Object
Keep the old implementation around to call.
-
#remove_queue(name) ⇒ Object
Given a queue name, completely deletes the queue and any associated metadata.
Instance Method Details
#original_remove_queue ⇒ Object
Keep the old implementation around to call
4 |
# File 'lib/resqueue-metadata/resque_extend.rb', line 4 alias_method :original_remove_queue, :remove_queue |
#remove_queue(name) ⇒ Object
Given a queue name, completely deletes the queue and any associated metadata
7 8 9 10 11 12 13 |
# File 'lib/resqueue-metadata/resque_extend.rb', line 7 def remove_queue name # Let the default implementation remove the queue original_return_value = original_remove_queue(name) # And now remove the metadata for this queue redis.del Resque::Queue::Metadata.(name) return original_return_value end |