eventq_rabbitmq 1.7.10 → 1.7.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/eventq_rabbitmq/rabbitmq_queue_worker.rb +5 -6
- data/lib/eventq_rabbitmq/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ff4c44fdb3ebb5ed46cc698b1613436cf373af9
|
4
|
+
data.tar.gz: 808fc05fb8c2b7ff563e5b8ec306ed23968fabd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
|