sidekiq-pool 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sidekiq/pool/cli.rb +11 -3
- 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: 0887032da31ec1d52ea77dfd7414b2930ba0bf3d
|
4
|
+
data.tar.gz: 266f2a1ea4abdb758e59908abf8c579c752c2354
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88803cd1358a5bb08ca9bc7fb6bcaf4346eacca9b4ca3bc5346726ce71ba0d1f3bcb7af9a437f30863ef096b9688692d3244a26965c70932670affbee4b4a8d9
|
7
|
+
data.tar.gz: f73a33bf8a23d85dded6ea5b3d7ce869ac85536fb2278ed31e605a6ecc0267c1d367e483b9ad2134983282bcf32c66a717be82c0875828926f6e5f58f2654cd0
|
data/lib/sidekiq/pool/cli.rb
CHANGED
@@ -41,11 +41,13 @@ module Sidekiq
|
|
41
41
|
|
42
42
|
DEFAULT_FORK_WAIT = 1
|
43
43
|
|
44
|
+
def working_directory
|
45
|
+
@working_directory || @settings[:working_directory]
|
46
|
+
end
|
47
|
+
|
44
48
|
def start_new_pool
|
45
49
|
logger.info 'Starting new pool'
|
46
50
|
@settings = parse_config_file(@pool_config)
|
47
|
-
working_directory = @working_directory || @settings[:working_directory]
|
48
|
-
Dir.chdir(working_directory) if working_directory
|
49
51
|
@types = @settings[:workers]
|
50
52
|
@types.each do |type|
|
51
53
|
type[:amount].times do
|
@@ -167,8 +169,14 @@ module Sidekiq
|
|
167
169
|
end
|
168
170
|
|
169
171
|
def fork_child(command, wait_for_busy = true)
|
170
|
-
logger.info "Adding child with args: (#{command}), waiting for busy: #{wait_for_busy}"
|
172
|
+
logger.info "Adding child with args: (#{command}) in #{working_directory}, waiting for busy: #{wait_for_busy}"
|
173
|
+
if working_directory && !Dir.exist?(working_directory)
|
174
|
+
logger.info "Working directory: #{working_directory} does not exist unable to fork"
|
175
|
+
return
|
176
|
+
end
|
177
|
+
|
171
178
|
pid = fork do
|
179
|
+
Dir.chdir(working_directory) if working_directory
|
172
180
|
opts = parse_options(command.split)
|
173
181
|
options.merge!(opts)
|
174
182
|
|
data/lib/sidekiq/pool/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-pool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Laurynas Butkus
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|