sidekiq-pool 1.5.2 → 1.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 966145cb98bc4acebef53bdb3b36040f2b38e41f
4
- data.tar.gz: fd4d1a5c55a8179831e4c7e7c54373d72b685323
3
+ metadata.gz: cad973497e8c77edeccabb25ea1be8395545f340
4
+ data.tar.gz: 2cd79072e5cd1f92ffd84144523b9e114bbeb83b
5
5
  SHA512:
6
- metadata.gz: 8b279012f85d761b9d19ef2bd96d9ca409eaa3a5ce557a6256fe14e5d9555642697dc313a40b464d1f54f9ca884f52dfb01008d3b1ebfa741adb212f79899b48
7
- data.tar.gz: 7138c24455fa0139ff365dff28a651e26b83b3aeedf8d8e3cb33dd09850f9ae7cd2b1d2211ab3fa5776a539007c013950623b69ae44a510bd64603a98d103088
6
+ metadata.gz: afd6bb8e4ec9b8c7c20fbbb0ad71e297525ec4d798fdb014ef086b80cfeb52beaba84cc6d9950eb4c077429e09d42ab7a5c5191dfbb9827e604294a852e7e469
7
+ data.tar.gz: 3b716f2d2c7014cf0d832e10a05e1171d04c4b89766096d4a7e935d2ecb2d88e53082d35d3bf4cf15b25458011a8baa0022c4304e82fab48911eaf6bc56208ae
@@ -47,8 +47,8 @@ module Sidekiq
47
47
 
48
48
  def start_new_pool
49
49
  logger.info 'Starting new pool'
50
- Dir.chdir(working_directory) if working_directory
51
50
  @settings = parse_config_file(@pool_config)
51
+ Dir.chdir(working_directory) if working_directory
52
52
  @types = @settings[:workers]
53
53
  @types.each do |type|
54
54
  type[:amount].times do
@@ -183,7 +183,14 @@ module Sidekiq
183
183
 
184
184
  @self_write.close
185
185
  $0 = 'sidekiq starting'
186
- options[:index] = @child_index++
186
+ @child_index += 1
187
+ options[:index] = @child_index
188
+
189
+ # reset child identity
190
+ @@process_nonce = nil
191
+ @@identity = nil
192
+ options[:identity] = identity
193
+
187
194
  run_child
188
195
  end
189
196
 
@@ -273,7 +280,9 @@ module Sidekiq
273
280
 
274
281
  def cmdline_busy?(pid)
275
282
  return unless alive?(pid)
276
- cmdline = File.read("/proc/#{pid}/cmdline")
283
+ path = "/proc/#{pid}/cmdline"
284
+ return unless File.exists?(path)
285
+ cmdline = File.read(path)
277
286
  return if cmdline.empty?
278
287
  !cmdline.scan(/busy\]/).empty?
279
288
  end
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module Pool
3
- VERSION = '1.5.2'
3
+ VERSION = '1.5.3'
4
4
  end
5
5
  end
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.2
4
+ version: 1.5.3
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-23 00:00:00.000000000 Z
11
+ date: 2017-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.4.5
110
+ rubygems_version: 2.6.11
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: Forks and manages multiple Sidekiq processes