sidekiq-cluster 0.1.0 → 0.1.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/lib/sidekiq/cluster/cli.rb +10 -11
- data/lib/sidekiq/cluster/version.rb +1 -1
- data/sidekiq-cluster.gemspec +1 -1
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c5be67c437089d629dd84e49d3370f58ffd337d
|
4
|
+
data.tar.gz: ea264f35a67a922097e22c432381b95573c2796f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f8062fd63c9e0a7c7bb6dff4927e24e98cc61004454acd35abd5b32a2ea0a4b996d9771c89633502d0a914d592d0f7351b27bb01bcaa5fd9d0acd8ab524a474
|
7
|
+
data.tar.gz: abb384d6f36a0994d5d69b2e66c2c6a1a6a6a169364c3da853f66e663872bfdc8166144b16a5de96674babc422d9f855a9af57c4cbe3b0f1c27a96eb45c1eab6
|
data/lib/sidekiq/cluster/cli.rb
CHANGED
@@ -196,26 +196,25 @@ module Sidekiq
|
|
196
196
|
end
|
197
197
|
|
198
198
|
def replace_pid(old_pid, new_pid)
|
199
|
-
|
200
|
-
|
201
|
-
pid_file = pid_file(pd.index)
|
199
|
+
pd = processes[old_pid]
|
200
|
+
pid_file = pid_file(pd.index)
|
202
201
|
|
203
|
-
|
204
|
-
|
205
|
-
|
202
|
+
::File.unlink(pid_file) if ::File.exist?(pidfile)
|
203
|
+
pids.delete(old_pid)
|
204
|
+
processes.delete(old_pid)
|
206
205
|
|
207
|
-
|
208
|
-
|
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
|
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
|
|
data/sidekiq-cluster.gemspec
CHANGED
@@ -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
|
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.
|
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
|
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
|
171
|
-
|
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: []
|