resque-multi-job-forks 0.5.0 → 0.5.1
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 +5 -5
- data/lib/resque-multi-job-forks.rb +5 -9
- metadata +3 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: cd2a600dbcd1f57dcee123b6cb34f055f170bf9ef8eb1a114ded55841bd99149
|
|
4
|
+
data.tar.gz: 80a3ffe7e7f626fb77e11487b51faa129a13a60382944d3c5c15e8c60b942c9e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1184ff5df61cebf795557a9e93b43be059a6bf1671ab7362a89400dcb2b7d97658e9f06735adf0d7c3a3f9cab57addc755232904ec0dff251106e71e116ffc5c
|
|
7
|
+
data.tar.gz: e6e76c24c2c2d591cc6c944ab3e8a9ef57ab67510ef1454b78a7e4704c9876fd78e1c44ebf52f47a0404254796728730757b1e5f89ce7e7cdd0c0a06bd93416b
|
|
@@ -54,14 +54,14 @@ module Resque
|
|
|
54
54
|
alias_method :shutdown?, :shutdown_with_multi_job_forks?
|
|
55
55
|
|
|
56
56
|
def shutdown_with_multi_job_forks
|
|
57
|
-
shutdown_child
|
|
57
|
+
shutdown_child
|
|
58
58
|
shutdown_without_multi_job_forks
|
|
59
59
|
end
|
|
60
60
|
alias_method :shutdown_without_multi_job_forks, :shutdown
|
|
61
61
|
alias_method :shutdown, :shutdown_with_multi_job_forks
|
|
62
62
|
|
|
63
63
|
def pause_processing_with_multi_job_forks
|
|
64
|
-
shutdown_child
|
|
64
|
+
shutdown_child
|
|
65
65
|
pause_processing_without_multi_job_forks
|
|
66
66
|
end
|
|
67
67
|
alias_method :pause_processing_without_multi_job_forks, :pause_processing
|
|
@@ -89,6 +89,7 @@ module Resque
|
|
|
89
89
|
# multiple jobs per fork. The QUIT signal normally does a graceful shutdown,
|
|
90
90
|
# and is re-registered in children (term_child normally unregisters it).
|
|
91
91
|
def shutdown_child
|
|
92
|
+
return unless @child
|
|
92
93
|
begin
|
|
93
94
|
log! "multi_jobs_per_fork: Sending QUIT signal to #{@child}"
|
|
94
95
|
Process.kill('QUIT', @child)
|
|
@@ -169,16 +170,11 @@ module Resque
|
|
|
169
170
|
# Call with a block to set the hook.
|
|
170
171
|
# Call with no arguments to return the hook.
|
|
171
172
|
def self.before_child_exit(&block)
|
|
172
|
-
|
|
173
|
-
@before_child_exit ||= []
|
|
174
|
-
@before_child_exit << block
|
|
175
|
-
end
|
|
176
|
-
@before_child_exit
|
|
173
|
+
block ? register_hook(:before_child_exit, block) : hooks(:before_child_exit)
|
|
177
174
|
end
|
|
178
175
|
|
|
179
176
|
# Set the before_child_exit proc.
|
|
180
177
|
def self.before_child_exit=(before_child_exit)
|
|
181
|
-
|
|
178
|
+
register_hook(:before_child_exit, block)
|
|
182
179
|
end
|
|
183
|
-
|
|
184
180
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: resque-multi-job-forks
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mick Staugaard
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2019-
|
|
13
|
+
date: 2019-05-23 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: resque
|
|
@@ -121,8 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
121
121
|
- !ruby/object:Gem::Version
|
|
122
122
|
version: '0'
|
|
123
123
|
requirements: []
|
|
124
|
-
|
|
125
|
-
rubygems_version: 2.6.14.3
|
|
124
|
+
rubygems_version: 3.0.3
|
|
126
125
|
signing_key:
|
|
127
126
|
specification_version: 4
|
|
128
127
|
summary: Have your resque workers process more that one job
|