Method: QueueMap#with_bunny
- Defined in:
- lib/queue_map.rb
#with_bunny(&block) ⇒ Object
85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/queue_map.rb', line 85 def with_bunny(&block) bunny = new_bunny_connection begin yield bunny ensure BUNNY_MUTEX.synchronize do bunny.stop rescue nil bunny.close_connection rescue nil end end end |