sidekiq-cluster 0.1.0 → 0.1.1

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: 9bd053636c77d2a9013f9eb4eaa7e0ebd387ca4e
4
- data.tar.gz: 2a70abcf93df422f9dd27c2ddc9b06ca9182d5b1
3
+ metadata.gz: 2c5be67c437089d629dd84e49d3370f58ffd337d
4
+ data.tar.gz: ea264f35a67a922097e22c432381b95573c2796f
5
5
  SHA512:
6
- metadata.gz: 1652ee6f5eb02205b29db3387d5d8b5b040018827416e87f5c219fe0a82837743a69840d4e162f12e1fc158d7c3888cab4342a34da7a76e5525937d28699f66b
7
- data.tar.gz: b9bb74bca5603651e1e461a2853a3fc7e23e2d1e02aadf73a1a79aa110a48c182088de889430d74cf2dfb65ba48c85f36ba27983d5be3a2fc1ea2d9db7704713
6
+ metadata.gz: 2f8062fd63c9e0a7c7bb6dff4927e24e98cc61004454acd35abd5b32a2ea0a4b996d9771c89633502d0a914d592d0f7351b27bb01bcaa5fd9d0acd8ab524a474
7
+ data.tar.gz: abb384d6f36a0994d5d69b2e66c2c6a1a6a6a169364c3da853f66e663872bfdc8166144b16a5de96674babc422d9f855a9af57c4cbe3b0f1c27a96eb45c1eab6
@@ -196,26 +196,25 @@ module Sidekiq
196
196
  end
197
197
 
198
198
  def replace_pid(old_pid, new_pid)
199
- if processes[old_pid]
200
- pd = processes[old_pid]
201
- pid_file = pid_file(pd.index)
199
+ pd = processes[old_pid]
200
+ pid_file = pid_file(pd.index)
202
201
 
203
- ::File.unlink(pid_file) if ::File.exist?(pidfile)
204
- pids.delete(old_pid)
205
- pd.pid = new_pid
202
+ ::File.unlink(pid_file) if ::File.exist?(pidfile)
203
+ pids.delete(old_pid)
204
+ processes.delete(old_pid)
206
205
 
207
- processes.delete(pid)
208
- processes[new_pid] = pd
209
- end
206
+ pd.pid = new_pid
207
+ processes[new_pid] = pd
210
208
  end
211
209
 
212
210
  def restart_dead_child(pid)
213
211
  info "pid=#{pid} died, restarting..."
214
212
 
215
- pd = processes[pid]
213
+ pd = processes[pid]
214
+ raise ArgumentError, "Unregistered pid found #{pid}, no existing descriptor found!" unless pd
216
215
  new_pid = fork_child(pd.index)
217
-
218
216
  replace_pid(pid, new_pid)
217
+
219
218
  info "replaced lost pid #{pid} with #{new_pid}"
220
219
  end
221
220
 
@@ -1,6 +1,6 @@
1
1
  module Sidekiq
2
2
  module Cluster
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
5
5
  end
6
6
 
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
  require 'sidekiq/cluster/version'
6
6
 
7
7
  Sidekiq::Cluster::DESCRIPTION = <<-eof
8
- This gem provides a wrapper script around starting sidekiq across multiple cores.
8
+ This library provides CLI interface for starting multiple copies of Sidekiq in parallel, typically to take advantage of multi-core systems. By default it starts N - 1 processes, where N is the number of cores on the current system. Sidekiq Cluster is controlled with CLI flags that appear before `--` (double dash), while any arguments that follow double dash are passed to each Sidekiq process. The exception is the `-P pidfile`, which clustering script passes to each sidekiq process individually.
9
9
  eof
10
10
 
11
11
  Gem::Specification.new do |spec|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-cluster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Gredeskoul
@@ -123,7 +123,7 @@ dependencies:
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  description: |2
126
- This gem provides a wrapper script around starting sidekiq across multiple cores.
126
+ This library provides CLI interface for starting multiple copies of Sidekiq in parallel, typically to take advantage of multi-core systems. By default it starts N - 1 processes, where N is the number of cores on the current system. Sidekiq Cluster is controlled with CLI flags that appear before `--` (double dash), while any arguments that follow double dash are passed to each Sidekiq process. The exception is the `-P pidfile`, which clustering script passes to each sidekiq process individually.
127
127
  email:
128
128
  - kigster@gmail.com
129
129
  executables:
@@ -167,6 +167,10 @@ rubyforge_project:
167
167
  rubygems_version: 2.4.5.2
168
168
  signing_key:
169
169
  specification_version: 4
170
- summary: This gem provides a wrapper script around starting sidekiq across multiple
171
- cores.
170
+ summary: This library provides CLI interface for starting multiple copies of Sidekiq
171
+ in parallel, typically to take advantage of multi-core systems. By default it starts
172
+ N - 1 processes, where N is the number of cores on the current system. Sidekiq Cluster
173
+ is controlled with CLI flags that appear before `--` (double dash), while any arguments
174
+ that follow double dash are passed to each Sidekiq process. The exception is the
175
+ `-P pidfile`, which clustering script passes to each sidekiq process individually.
172
176
  test_files: []