lolitra 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -73,10 +73,12 @@ module Lolitra
73
73
  queue_name = generate_queue_name(handler_class)
74
74
  begin
75
75
  create_channel(self.connection) do |channel|
76
+ Lolitra::logger.error(queue_name)
76
77
  queue = channel.queue(queue_name, SUBSCRIBE_OPTIONS) do |queue|
77
78
  begin
78
- queue.delete
79
- block.call(handler_class, true)
79
+ queue.delete do
80
+ block.call(handler_class, true)
81
+ end
80
82
  rescue => e
81
83
  Lolitra::log_exception(e)
82
84
  block.call(handler_class, false)
@@ -176,7 +178,11 @@ module Lolitra
176
178
  end
177
179
 
178
180
  def generate_queue_name(handler_class)
179
- "#{@options[:queue_prefix]}#{MessageHandler::Helpers.underscore(handler_class.name)}#{@options[:queue_suffix]}"
181
+ if handler_class.respond_to?('queue_name')
182
+ handler_class.queue_name
183
+ else
184
+ "#{@options[:queue_prefix]}#{MessageHandler::Helpers.underscore(handler_class.name)}#{@options[:queue_suffix]}"
185
+ end
180
186
  end
181
187
 
182
188
  def generate_queue_name_dead(handler_class)
@@ -1,3 +1,3 @@
1
1
  module Lolitra
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 1
9
- version: 0.2.1
8
+ - 2
9
+ version: 0.2.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Hugo Freire
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2015-02-26 00:00:00 +01:00
17
+ date: 2015-03-20 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency