sidekiq-pool 1.7.0 → 1.7.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 +4 -4
- data/README.md +10 -0
- data/lib/sidekiq/pool.rb +10 -0
- data/lib/sidekiq/pool/cli.rb +5 -0
- data/lib/sidekiq/pool/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7a162dd3ea8ea76a7cf305fbff7d91c0f99e61a5
|
|
4
|
+
data.tar.gz: 3a78db0121e97e963b040609e7a7885d57dc460f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 313c847ff56222ed271b37274ce7339ff2778f38742017fecd8a32a15065aa052c7fe42d0f01008be82342d6ee77f9e2ce10136e234f460cf680a17f371627a7
|
|
7
|
+
data.tar.gz: 77c2f57d9294ccedd64bcd2a8ba032e5ad1d259219f3603e9f475b59a672d4877538a71c160dea4b246e4c1442097e991c9b89122a5aef6b4a2f7853ba66ece3
|
data/README.md
CHANGED
|
@@ -48,6 +48,16 @@ Signal `HUP` to parent starts new children and then stops old.
|
|
|
48
48
|
When using symlinked working directory `working_directory` configuration
|
|
49
49
|
option must be used to pick up new code.
|
|
50
50
|
|
|
51
|
+
## After fork
|
|
52
|
+
|
|
53
|
+
You may want to execute code after process has been forked. It can be done by registering after_fork hook like this
|
|
54
|
+
```ruby
|
|
55
|
+
require 'sidekiq/pool'
|
|
56
|
+
Sidekiq::Pool.after_fork do
|
|
57
|
+
# run code here
|
|
58
|
+
end
|
|
59
|
+
```
|
|
60
|
+
|
|
51
61
|
## Contributing
|
|
52
62
|
|
|
53
63
|
Bug reports and pull requests are welcome on GitHub at https://github.com/laurynas/sidekiq-pool.
|
data/lib/sidekiq/pool.rb
CHANGED
data/lib/sidekiq/pool/cli.rb
CHANGED
|
@@ -211,6 +211,7 @@ module Sidekiq
|
|
|
211
211
|
@@identity = nil
|
|
212
212
|
options[:identity] = identity
|
|
213
213
|
|
|
214
|
+
run_after_fork_hooks
|
|
214
215
|
run_child
|
|
215
216
|
end
|
|
216
217
|
|
|
@@ -275,6 +276,10 @@ module Sidekiq
|
|
|
275
276
|
end
|
|
276
277
|
end
|
|
277
278
|
|
|
279
|
+
def run_after_fork_hooks
|
|
280
|
+
Sidekiq::Pool.after_fork_hooks.each(&:call)
|
|
281
|
+
end
|
|
282
|
+
|
|
278
283
|
def add_reload_marker
|
|
279
284
|
return unless options[:pidfile]
|
|
280
285
|
File.write([options[:pidfile], '.reload'].join, '')
|
data/lib/sidekiq/pool/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sidekiq-pool
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.7.
|
|
4
|
+
version: 1.7.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Laurynas Butkus
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2018-05-
|
|
12
|
+
date: 2018-05-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: sidekiq
|