queueing_rabbit 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/queueing_rabbit/version.rb +1 -1
- data/lib/queueing_rabbit/worker.rb +4 -5
- metadata +3 -3
@@ -57,9 +57,7 @@ module QueueingRabbit
|
|
57
57
|
"PID=#{pid}, JOBS=#{jobs.join(',')}"
|
58
58
|
end
|
59
59
|
|
60
|
-
def stop
|
61
|
-
connection = QueueingRabbit.connection
|
62
|
-
|
60
|
+
def stop(connection = QueueingRabbit.connection)
|
63
61
|
connection.next_tick do
|
64
62
|
connection.close do
|
65
63
|
info "gracefully shutting down the worker #{self}"
|
@@ -114,8 +112,9 @@ module QueueingRabbit
|
|
114
112
|
end
|
115
113
|
|
116
114
|
def trap_signals
|
117
|
-
|
118
|
-
Signal.trap("
|
115
|
+
connection = QueueingRabbit.connection
|
116
|
+
Signal.trap("TERM") { stop(connection) }
|
117
|
+
Signal.trap("INT") { stop(connection) }
|
119
118
|
end
|
120
119
|
|
121
120
|
def cleanup_pidfile
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: queueing_rabbit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -174,7 +174,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
174
174
|
version: '0'
|
175
175
|
segments:
|
176
176
|
- 0
|
177
|
-
hash: -
|
177
|
+
hash: -1357622515431572496
|
178
178
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
179
|
none: false
|
180
180
|
requirements:
|
@@ -183,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
183
|
version: '0'
|
184
184
|
segments:
|
185
185
|
- 0
|
186
|
-
hash: -
|
186
|
+
hash: -1357622515431572496
|
187
187
|
requirements: []
|
188
188
|
rubyforge_project:
|
189
189
|
rubygems_version: 1.8.23
|