eventq_rabbitmq 1.7.10 → 1.7.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c67f200ec80b84e8851066d2c3e56a9342e1e13f
4
- data.tar.gz: b71b02f7fa301a2c6defad9748a9df57345bb32c
3
+ metadata.gz: 8ff4c44fdb3ebb5ed46cc698b1613436cf373af9
4
+ data.tar.gz: 808fc05fb8c2b7ff563e5b8ec306ed23968fabd1
5
5
  SHA512:
6
- metadata.gz: 604c29e6c72cbcbb98bd5059d1f36d6194f7d6d658e7ec5a795b9485053285ed486a41387dc1e634e1235537097bd61c22a8f7d5de3543cfdc901938a4c09930
7
- data.tar.gz: 3d9f83ee5a49a9b86bcd86546834c744ab8f4aaaace4af7c13b1076cf49740ba3e5d0a00e5ac5c1006aa60dc89f3353d0254525035ab4b8969c0c08917664183
6
+ metadata.gz: 1ff53553ed50ac7bf30bb9690b29f685a4e27610ca8d14d09a10690d86bf92e09e74fa25bc878d42386a532dd576f5e3fad44630681c98577a20109cdd4f183b
7
+ data.tar.gz: ef868bf2df017d3edc1d42416e6a55ffdabca1a0d05b1ef8ea5311c87fee8236e34e6e2b7a14d01b2f5bd0a35ecd3d60e8d8afa7362a33e57130a4db37aaeb7c
@@ -66,6 +66,7 @@ module EventQ
66
66
  client = options[:client]
67
67
  manager = EventQ::RabbitMq::QueueManager.new
68
68
  manager.durable = options[:durable]
69
+ @connection = client.get_connection
69
70
 
70
71
  @threads = []
71
72
 
@@ -85,8 +86,7 @@ module EventQ
85
86
 
86
87
  begin
87
88
 
88
- connection = client.get_connection
89
- channel = connection.create_channel
89
+ channel = @connection.create_channel
90
90
 
91
91
  has_processed = thread_process_iteration(channel, manager, queue, block)
92
92
 
@@ -98,10 +98,6 @@ module EventQ
98
98
  channel.close
99
99
  end
100
100
 
101
- if connection != nil
102
- connection.close
103
- end
104
-
105
101
  if !has_processed
106
102
  EventQ.log(:debug, "[#{self.class}] - Sleeping for #{@sleep} seconds")
107
103
  sleep(@sleep)
@@ -189,6 +185,9 @@ module EventQ
189
185
  puts "[#{self.class}] - Stopping..."
190
186
  @is_running = false
191
187
  @threads.each { |thr| thr.join }
188
+ if @connection != nil
189
+ @connection.close
190
+ end
192
191
  return true
193
192
  end
194
193
 
@@ -1,3 +1,3 @@
1
1
  module EventqRabbitmq
2
- VERSION = "1.7.10"
2
+ VERSION = "1.7.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventq_rabbitmq
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.10
4
+ version: 1.7.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaughanbrittonsage