eventq_rabbitmq 1.6.3 → 1.6.4
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 +8 -20
- 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: 658400275d1c0a93428319469f074344fe632903
|
4
|
+
data.tar.gz: e8e6ef5a99aaf7bf37179c7d8a6b1f08297477fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38fce62ce712383ede858a9b74615b46012023de86b8ae71227b0245a5e26457779d840045c2aa6b3a7749fff5d6099f7c539e739fc57797be55d68c521b5269
|
7
|
+
data.tar.gz: a10f9e8ae71119183ec0026a1e251227643400295a23a8bc948b423727c86bafa44c1cf530b5e5f8c3cafd4d5fe4bcc9386380fa80b9765cd59473400a95e6e9
|
@@ -16,13 +16,6 @@ module EventQ
|
|
16
16
|
|
17
17
|
def start(queue, options = {}, &block)
|
18
18
|
|
19
|
-
%w'INT TERM'.each do
|
20
|
-
Signal.trap('TERM') {
|
21
|
-
stop
|
22
|
-
exit
|
23
|
-
}
|
24
|
-
end
|
25
|
-
|
26
19
|
EventQ.log(:info, "[#{self.class}] - Preparing to start listening for messages.")
|
27
20
|
|
28
21
|
configure(queue, options)
|
@@ -40,14 +33,6 @@ module EventQ
|
|
40
33
|
if @fork_count > 1
|
41
34
|
@fork_count.times do
|
42
35
|
pid = fork do
|
43
|
-
|
44
|
-
%w'INT TERM'.each do
|
45
|
-
Signal.trap('TERM') {
|
46
|
-
stop
|
47
|
-
exit
|
48
|
-
}
|
49
|
-
end
|
50
|
-
|
51
36
|
@is_running = true
|
52
37
|
start_process(options, queue, block)
|
53
38
|
end
|
@@ -67,6 +52,13 @@ module EventQ
|
|
67
52
|
|
68
53
|
def start_process(options, queue, block)
|
69
54
|
|
55
|
+
%w'INT TERM'.each do |sig|
|
56
|
+
Signal.trap(sig) {
|
57
|
+
stop
|
58
|
+
exit
|
59
|
+
}
|
60
|
+
end
|
61
|
+
|
70
62
|
@threads = []
|
71
63
|
|
72
64
|
#loop through each thread count
|
@@ -168,11 +160,7 @@ module EventQ
|
|
168
160
|
def stop
|
169
161
|
puts "[#{self.class}] - Stopping..."
|
170
162
|
@is_running = false
|
171
|
-
|
172
|
-
@forks.each { |pid| Process.kill('INT', pid) }
|
173
|
-
else
|
174
|
-
@threads.each { |thr| thr.join }
|
175
|
-
end
|
163
|
+
@threads.each { |thr| thr.join }
|
176
164
|
|
177
165
|
return true
|
178
166
|
end
|