einhorn 0.8.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changes.md +10 -0
- data/{LICENSE → LICENSE.txt} +0 -0
- data/README.md +5 -36
- data/einhorn.gemspec +23 -21
- data/example/pool_worker.rb +2 -2
- data/example/thin_example +8 -8
- data/example/time_server +5 -5
- data/lib/einhorn/client.rb +8 -8
- data/lib/einhorn/command/interface.rb +92 -98
- data/lib/einhorn/command.rb +76 -85
- data/lib/einhorn/compat.rb +7 -7
- data/lib/einhorn/event/abstract_text_descriptor.rb +31 -35
- data/lib/einhorn/event/ack_timer.rb +2 -2
- data/lib/einhorn/event/command_server.rb +7 -9
- data/lib/einhorn/event/connection.rb +1 -3
- data/lib/einhorn/event/loop_breaker.rb +2 -1
- data/lib/einhorn/event/persistent.rb +2 -2
- data/lib/einhorn/event/timer.rb +4 -4
- data/lib/einhorn/event.rb +19 -19
- data/lib/einhorn/prctl.rb +2 -2
- data/lib/einhorn/prctl_linux.rb +13 -14
- data/lib/einhorn/safe_yaml.rb +17 -0
- data/lib/einhorn/version.rb +1 -1
- data/lib/einhorn/worker.rb +26 -30
- data/lib/einhorn/worker_pool.rb +9 -9
- data/lib/einhorn.rb +120 -125
- metadata +33 -117
- data/.gitignore +0 -17
- data/.travis.yml +0 -10
- data/CONTRIBUTORS +0 -6
- data/Gemfile +0 -11
- data/History.txt +0 -4
- data/README.md.in +0 -94
- data/Rakefile +0 -27
- data/test/_lib.rb +0 -12
- data/test/integration/_lib/fixtures/env_printer/env_printer.rb +0 -26
- data/test/integration/_lib/fixtures/exit_during_upgrade/exiting_server.rb +0 -23
- data/test/integration/_lib/fixtures/exit_during_upgrade/upgrade_reexec.rb +0 -6
- data/test/integration/_lib/fixtures/pdeathsig_printer/pdeathsig_printer.rb +0 -29
- data/test/integration/_lib/fixtures/signal_timeout/sleepy_server.rb +0 -23
- data/test/integration/_lib/fixtures/upgrade_project/upgrading_server.rb +0 -24
- data/test/integration/_lib/helpers/einhorn_helpers.rb +0 -148
- data/test/integration/_lib/helpers.rb +0 -4
- data/test/integration/_lib.rb +0 -6
- data/test/integration/pdeathsig.rb +0 -26
- data/test/integration/startup.rb +0 -31
- data/test/integration/upgrading.rb +0 -204
- data/test/unit/_lib/bad_worker.rb +0 -7
- data/test/unit/_lib/sleep_worker.rb +0 -5
- data/test/unit/einhorn/client.rb +0 -88
- data/test/unit/einhorn/command/interface.rb +0 -49
- data/test/unit/einhorn/command.rb +0 -135
- data/test/unit/einhorn/event.rb +0 -89
- data/test/unit/einhorn/worker_pool.rb +0 -39
- data/test/unit/einhorn.rb +0 -96
data/lib/einhorn.rb
CHANGED
@@ -1,18 +1,36 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
6
|
-
require
|
7
|
-
require
|
8
|
-
require
|
1
|
+
require "fcntl"
|
2
|
+
require "optparse"
|
3
|
+
require "pp"
|
4
|
+
require "set"
|
5
|
+
require "socket"
|
6
|
+
require "tmpdir"
|
7
|
+
require "yaml"
|
8
|
+
require "shellwords"
|
9
|
+
require "einhorn/safe_yaml"
|
9
10
|
|
10
11
|
module Einhorn
|
11
12
|
module AbstractState
|
12
|
-
def default_state
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
def default_state
|
14
|
+
raise NotImplementedError.new("Override in extended modules")
|
15
|
+
end
|
16
|
+
|
17
|
+
def state
|
18
|
+
@state ||= default_state
|
19
|
+
end
|
20
|
+
|
21
|
+
def state=(v)
|
22
|
+
@state = v
|
23
|
+
end
|
24
|
+
|
25
|
+
def dumpable_state
|
26
|
+
state
|
27
|
+
end
|
28
|
+
|
29
|
+
def respond_to_missing?(name)
|
30
|
+
((name.to_s =~ /(.*)=$/) && state.has_key?($1.to_sym)) ||
|
31
|
+
state.has_key?(name) ||
|
32
|
+
default_state.has_key?(name)
|
33
|
+
end
|
16
34
|
|
17
35
|
def method_missing(name, *args)
|
18
36
|
if (name.to_s =~ /(.*)=$/) && state.has_key?($1.to_sym)
|
@@ -37,39 +55,39 @@ module Einhorn
|
|
37
55
|
# about backwards/forwards compatibility for upgrades/downgrades
|
38
56
|
def self.default_state
|
39
57
|
{
|
40
|
-
:
|
41
|
-
:
|
42
|
-
:
|
43
|
-
:
|
44
|
-
:
|
45
|
-
:
|
46
|
-
:
|
47
|
-
:
|
48
|
-
:
|
49
|
-
:
|
50
|
-
:
|
51
|
-
:
|
52
|
-
:
|
53
|
-
:
|
54
|
-
:
|
55
|
-
:
|
56
|
-
:
|
57
|
-
:
|
58
|
-
:
|
59
|
-
:
|
60
|
-
:
|
61
|
-
:
|
62
|
-
:
|
63
|
-
:
|
64
|
-
:
|
65
|
-
:
|
66
|
-
:
|
67
|
-
:
|
68
|
-
:
|
69
|
-
:
|
70
|
-
:
|
71
|
-
:
|
72
|
-
:
|
58
|
+
children: {},
|
59
|
+
config: {number: 1, backlog: 100, seconds: 1},
|
60
|
+
versions: {},
|
61
|
+
version: 0,
|
62
|
+
sockets: {},
|
63
|
+
orig_cmd: nil,
|
64
|
+
bind: [],
|
65
|
+
bind_fds: [],
|
66
|
+
bound_ports: [],
|
67
|
+
cmd: nil,
|
68
|
+
script_name: nil,
|
69
|
+
respawn: true,
|
70
|
+
upgrading: false,
|
71
|
+
smooth_upgrade: false,
|
72
|
+
reloading_for_upgrade: false,
|
73
|
+
path: nil,
|
74
|
+
cmd_name: nil,
|
75
|
+
verbosity: 1,
|
76
|
+
generation: 0,
|
77
|
+
last_spinup: nil,
|
78
|
+
ack_mode: {type: :timer, timeout: 1},
|
79
|
+
kill_children_on_exit: false,
|
80
|
+
command_socket_as_fd: false,
|
81
|
+
socket_path: nil,
|
82
|
+
pidfile: nil,
|
83
|
+
lockfile: nil,
|
84
|
+
consecutive_deaths_before_ack: 0,
|
85
|
+
last_upgraded: nil,
|
86
|
+
nice: {master: nil, worker: nil, renice_cmd: "/usr/bin/renice"},
|
87
|
+
reexec_commandline: nil,
|
88
|
+
drop_environment_variables: [],
|
89
|
+
signal_timeout: nil,
|
90
|
+
preloaded: false
|
73
91
|
}
|
74
92
|
end
|
75
93
|
end
|
@@ -78,20 +96,20 @@ module Einhorn
|
|
78
96
|
extend AbstractState
|
79
97
|
def self.default_state
|
80
98
|
{
|
81
|
-
:
|
82
|
-
:
|
83
|
-
:
|
84
|
-
:
|
85
|
-
:
|
86
|
-
:
|
99
|
+
whatami: :master,
|
100
|
+
script_name: nil,
|
101
|
+
argv: [],
|
102
|
+
environ: {},
|
103
|
+
has_outstanding_spinup_timer: false,
|
104
|
+
stateful: nil,
|
87
105
|
# Holds references so that the GC doesn't go and close your sockets.
|
88
|
-
:
|
106
|
+
socket_handles: Set.new
|
89
107
|
}
|
90
108
|
end
|
91
109
|
end
|
92
110
|
|
93
111
|
def self.restore_state(state)
|
94
|
-
parsed =
|
112
|
+
parsed = SafeYAML.load(state)
|
95
113
|
updated_state, message = update_state(Einhorn::State, "einhorn", parsed[:state])
|
96
114
|
Einhorn::State.state = updated_state
|
97
115
|
Einhorn::Event.restore_persistent_descriptors(parsed[:persistent_descriptors])
|
@@ -113,15 +131,13 @@ module Einhorn
|
|
113
131
|
# them all
|
114
132
|
dead = []
|
115
133
|
updated_state[:children].each do |pid, v|
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
dead << pid
|
121
|
-
end
|
134
|
+
pid = Process.wait(pid, Process::WNOHANG)
|
135
|
+
dead << pid if pid
|
136
|
+
rescue Errno::ECHILD
|
137
|
+
dead << pid
|
122
138
|
end
|
123
139
|
Einhorn::Event::Timer.open(0) do
|
124
|
-
dead.each {|pid| Einhorn::Command.cleanup(pid)}
|
140
|
+
dead.each { |pid| Einhorn::Command.cleanup(pid) }
|
125
141
|
end
|
126
142
|
end
|
127
143
|
|
@@ -130,12 +146,12 @@ module Einhorn
|
|
130
146
|
deleted_keys = updated_state.keys - default.keys
|
131
147
|
return [updated_state, message.first] if added_keys.length == 0 && deleted_keys.length == 0
|
132
148
|
|
133
|
-
added_keys.each {|key| updated_state[key] = default[key]}
|
134
|
-
deleted_keys.each {|key| updated_state.delete(key)}
|
149
|
+
added_keys.each { |key| updated_state[key] = default[key] }
|
150
|
+
deleted_keys.each { |key| updated_state.delete(key) }
|
135
151
|
|
136
152
|
message << "adding default values for #{added_keys.inspect}"
|
137
153
|
message << "deleting values for #{deleted_keys.inspect}"
|
138
|
-
message = "State format for #{store_name} has changed: #{message.join(
|
154
|
+
message = "State format for #{store_name} has changed: #{message.join(", ")}"
|
139
155
|
|
140
156
|
# Can't print yet, since state hasn't been set, so we pass along the message.
|
141
157
|
[updated_state, message]
|
@@ -150,14 +166,14 @@ module Einhorn
|
|
150
166
|
sd = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM, 0)
|
151
167
|
Einhorn::Compat.cloexec!(sd, false)
|
152
168
|
|
153
|
-
if flags.include?(
|
169
|
+
if flags.include?("r") || flags.include?("so_reuseaddr")
|
154
170
|
sd.setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEADDR, 1)
|
155
171
|
end
|
156
172
|
|
157
173
|
sd.bind(Socket.pack_sockaddr_in(port, addr))
|
158
174
|
sd.listen(Einhorn::State.config[:backlog])
|
159
175
|
|
160
|
-
if flags.include?(
|
176
|
+
if flags.include?("n") || flags.include?("o_nonblock")
|
161
177
|
fl = sd.fcntl(Fcntl::F_GETFL)
|
162
178
|
sd.fcntl(Fcntl::F_SETFL, fl | Fcntl::O_NONBLOCK)
|
163
179
|
end
|
@@ -167,28 +183,28 @@ module Einhorn
|
|
167
183
|
end
|
168
184
|
|
169
185
|
# Implement these ourselves so it plays nicely with state persistence
|
170
|
-
def self.log_debug(msg, tag=nil)
|
171
|
-
|
186
|
+
def self.log_debug(msg, tag = nil)
|
187
|
+
warn("#{log_tag} DEBUG: #{msg}\n") if Einhorn::State.verbosity <= 0
|
172
188
|
$stderr.flush
|
173
|
-
|
189
|
+
send_tagged_message(tag, msg) if tag
|
174
190
|
end
|
175
|
-
|
176
|
-
|
191
|
+
|
192
|
+
def self.log_info(msg, tag = nil)
|
193
|
+
warn("#{log_tag} INFO: #{msg}\n") if Einhorn::State.verbosity <= 1
|
177
194
|
$stderr.flush
|
178
|
-
|
195
|
+
send_tagged_message(tag, msg) if tag
|
179
196
|
end
|
180
|
-
|
181
|
-
|
197
|
+
|
198
|
+
def self.log_error(msg, tag = nil)
|
199
|
+
warn("#{log_tag} ERROR: #{msg}\n") if Einhorn::State.verbosity <= 2
|
182
200
|
$stderr.flush
|
183
|
-
|
201
|
+
send_tagged_message(tag, "ERROR: #{msg}") if tag
|
184
202
|
end
|
185
203
|
|
186
|
-
def self.send_tagged_message(tag, message, last=false)
|
204
|
+
def self.send_tagged_message(tag, message, last = false)
|
187
205
|
Einhorn::Command::Interface.send_tagged_message(tag, message, last)
|
188
206
|
end
|
189
207
|
|
190
|
-
private
|
191
|
-
|
192
208
|
def self.log_tag
|
193
209
|
case whatami = Einhorn::TransientState.whatami
|
194
210
|
when :master
|
@@ -201,17 +217,16 @@ module Einhorn
|
|
201
217
|
"[UNKNOWN (#{whatami.inspect}) #{$$}]"
|
202
218
|
end
|
203
219
|
end
|
204
|
-
|
205
|
-
public
|
220
|
+
private_class_method :log_tag
|
206
221
|
|
207
222
|
def self.which(cmd)
|
208
|
-
if cmd.include?(
|
209
|
-
return cmd if File.
|
223
|
+
if cmd.include?("/")
|
224
|
+
return cmd if File.exist?(cmd)
|
210
225
|
raise "Could not find #{cmd}"
|
211
226
|
else
|
212
|
-
ENV[
|
227
|
+
ENV["PATH"].split(":").each do |f|
|
213
228
|
abs = File.join(f, cmd)
|
214
|
-
return abs if File.
|
229
|
+
return abs if File.exist?(abs)
|
215
230
|
end
|
216
231
|
raise "Could not find #{cmd} in PATH"
|
217
232
|
end
|
@@ -221,19 +236,19 @@ module Einhorn
|
|
221
236
|
def self.is_script(file)
|
222
237
|
File.open(file) do |f|
|
223
238
|
bytes = f.read(2)
|
224
|
-
bytes ==
|
239
|
+
bytes == "#!"
|
225
240
|
end
|
226
241
|
end
|
227
242
|
|
228
243
|
def self.preload
|
229
|
-
if path = Einhorn::State.path
|
244
|
+
if (path = Einhorn::State.path)
|
230
245
|
set_argv(Einhorn::State.cmd, false)
|
231
246
|
|
232
247
|
begin
|
233
248
|
# Reset preloaded state to false - this allows us to monitor for failed preloads during reloads.
|
234
249
|
Einhorn::State.preloaded = false
|
235
250
|
# If it's not going to be requireable, then load it.
|
236
|
-
if !path.end_with?(
|
251
|
+
if !path.end_with?(".rb") && File.exist?(path)
|
237
252
|
log_info("Loading #{path} (if this hangs, make sure your code can be properly loaded as a library)", :upgrade)
|
238
253
|
load path
|
239
254
|
else
|
@@ -242,7 +257,7 @@ module Einhorn
|
|
242
257
|
|
243
258
|
force_move_to_oldgen if Einhorn::State.config[:gc_before_fork]
|
244
259
|
end
|
245
|
-
rescue
|
260
|
+
rescue StandardError, LoadError => e
|
246
261
|
log_info("Proceeding with postload -- could not load #{path}: #{e} (#{e.class})\n #{e.backtrace.join("\n ")}", :upgrade)
|
247
262
|
else
|
248
263
|
if defined?(einhorn_main)
|
@@ -274,7 +289,7 @@ module Einhorn
|
|
274
289
|
def self.set_argv(cmd, set_ps_name)
|
275
290
|
# TODO: clean up this hack
|
276
291
|
idx = 0
|
277
|
-
if cmd[0]
|
292
|
+
if /(^|\/)ruby$/.match?(cmd[0])
|
278
293
|
idx = 1
|
279
294
|
elsif !is_script(cmd[0])
|
280
295
|
log_info("WARNING: Going to set $0 to #{cmd[idx]}, but it doesn't look like a script")
|
@@ -291,7 +306,7 @@ module Einhorn
|
|
291
306
|
$0 = worker_ps_name
|
292
307
|
end
|
293
308
|
|
294
|
-
ARGV[0..-1] = cmd[idx+1..-1]
|
309
|
+
ARGV[0..-1] = cmd[idx + 1..-1]
|
295
310
|
log_info("Set#{set_ps_name ? " $0 = #{$0.inspect}, " : nil} ARGV = #{ARGV.inspect}")
|
296
311
|
end
|
297
312
|
|
@@ -304,15 +319,15 @@ module Einhorn
|
|
304
319
|
end
|
305
320
|
|
306
321
|
def self.worker_ps_name
|
307
|
-
Einhorn::State.cmd_name ? "ruby #{Einhorn::State.cmd_name}" : Einhorn::State.orig_cmd.join(
|
322
|
+
Einhorn::State.cmd_name ? "ruby #{Einhorn::State.cmd_name}" : Einhorn::State.orig_cmd.join(" ")
|
308
323
|
end
|
309
324
|
|
310
325
|
def self.renice_self
|
311
326
|
whatami = Einhorn::TransientState.whatami
|
312
|
-
return unless nice = Einhorn::State.nice[whatami]
|
327
|
+
return unless (nice = Einhorn::State.nice[whatami])
|
313
328
|
pid = $$
|
314
329
|
|
315
|
-
unless nice.
|
330
|
+
unless nice.is_a?(Integer)
|
316
331
|
raise "Nice must be a fixnum: #{nice.inspect}"
|
317
332
|
end
|
318
333
|
|
@@ -334,28 +349,9 @@ module Einhorn
|
|
334
349
|
end
|
335
350
|
end
|
336
351
|
|
337
|
-
# This duplicates some code from the environment path, but is
|
338
|
-
# deprecated so that's ok.
|
339
|
-
def self.socketify!(cmd)
|
340
|
-
cmd.map! do |arg|
|
341
|
-
if arg =~ /^(.*=|)srv:([^:]+):(\d+)((?:,\w+)*)$/
|
342
|
-
log_error("Using deprecated command-line configuration for Einhorn; should upgrade to the environment variable interface.")
|
343
|
-
opt = $1
|
344
|
-
host = $2
|
345
|
-
port = $3
|
346
|
-
flags = $4.split(',').select {|flag| flag.length > 0}.map {|flag| flag.downcase}
|
347
|
-
Einhorn::State.sockets[[host, port]] ||= bind(host, port, flags)[0]
|
348
|
-
fd = Einhorn::State.sockets[[host, port]]
|
349
|
-
"#{opt}#{fd}"
|
350
|
-
else
|
351
|
-
arg
|
352
|
-
end
|
353
|
-
end
|
354
|
-
end
|
355
|
-
|
356
352
|
# Construct and a command and args that can be used to re-exec
|
357
353
|
# Einhorn for upgrades.
|
358
|
-
def self.upgrade_commandline(einhorn_flags=[])
|
354
|
+
def self.upgrade_commandline(einhorn_flags = [])
|
359
355
|
cmdline = []
|
360
356
|
if Einhorn::State.reexec_commandline
|
361
357
|
cmdline += Einhorn::State.reexec_commandline
|
@@ -363,7 +359,7 @@ module Einhorn
|
|
363
359
|
cmdline << Einhorn::TransientState.script_name
|
364
360
|
end
|
365
361
|
cmdline += einhorn_flags
|
366
|
-
cmdline <<
|
362
|
+
cmdline << "--"
|
367
363
|
cmdline += Einhorn::State.cmd
|
368
364
|
[cmdline[0], cmdline[1..-1]]
|
369
365
|
end
|
@@ -375,7 +371,7 @@ module Einhorn
|
|
375
371
|
upgrade_sentinel = fork do
|
376
372
|
Einhorn::TransientState.whatami = :upgrade_sentinel
|
377
373
|
Einhorn.initialize_reload_environment
|
378
|
-
Einhorn::Compat.exec(*Einhorn.upgrade_commandline([
|
374
|
+
Einhorn::Compat.exec(*Einhorn.upgrade_commandline(["--upgrade-check"]))
|
379
375
|
end
|
380
376
|
Process.wait(upgrade_sentinel)
|
381
377
|
$?.exitstatus.zero?
|
@@ -400,10 +396,10 @@ module Einhorn
|
|
400
396
|
# startup. Currently, this means the bundler and rbenv versions.
|
401
397
|
def self.dump_environment_info
|
402
398
|
log_info("Running under Ruby #{RUBY_VERSION}", :environment)
|
403
|
-
log_info("Rbenv ruby version: #{ENV[
|
399
|
+
log_info("Rbenv ruby version: #{ENV["RBENV_VERSION"]}", :environment) if ENV["RBENV_VERSION"]
|
404
400
|
begin
|
405
|
-
bundler_gem = Gem::Specification.find_by_name(
|
406
|
-
log_info("Using Bundler #{bundler_gem.version
|
401
|
+
bundler_gem = Gem::Specification.find_by_name("bundler")
|
402
|
+
log_info("Using Bundler #{bundler_gem.version}", :environment)
|
407
403
|
rescue Gem::LoadError
|
408
404
|
end
|
409
405
|
end
|
@@ -424,7 +420,6 @@ module Einhorn
|
|
424
420
|
# TODO: don't actually alter ARGV[0]?
|
425
421
|
Einhorn::State.cmd[0] = which(Einhorn::State.cmd[0])
|
426
422
|
socketify_env!
|
427
|
-
socketify!(Einhorn::State.cmd)
|
428
423
|
end
|
429
424
|
|
430
425
|
set_master_ps_name
|
@@ -459,10 +454,10 @@ module Einhorn
|
|
459
454
|
end
|
460
455
|
end
|
461
456
|
|
462
|
-
require
|
463
|
-
require
|
464
|
-
require
|
465
|
-
require
|
466
|
-
require
|
467
|
-
require
|
468
|
-
require
|
457
|
+
require "einhorn/command"
|
458
|
+
require "einhorn/compat"
|
459
|
+
require "einhorn/client"
|
460
|
+
require "einhorn/event"
|
461
|
+
require "einhorn/worker"
|
462
|
+
require "einhorn/worker_pool"
|
463
|
+
require "einhorn/version"
|
metadata
CHANGED
@@ -1,134 +1,88 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: einhorn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
|
7
|
+
- Stripe
|
8
|
+
- Mike Perham
|
9
|
+
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2022-07-14 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
15
|
+
name: rake
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
16
17
|
requirements:
|
17
18
|
- - "~>"
|
18
19
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
+
version: '13'
|
20
21
|
type: :development
|
21
22
|
prerelease: false
|
22
23
|
version_requirements: !ruby/object:Gem::Requirement
|
23
24
|
requirements:
|
24
25
|
- - "~>"
|
25
26
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: pry
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
27
|
+
version: '13'
|
55
28
|
- !ruby/object:Gem::Dependency
|
56
29
|
name: minitest
|
57
30
|
requirement: !ruby/object:Gem::Requirement
|
58
31
|
requirements:
|
59
|
-
- - "
|
32
|
+
- - "~>"
|
60
33
|
- !ruby/object:Gem::Version
|
61
|
-
version: '5
|
34
|
+
version: '5'
|
62
35
|
type: :development
|
63
36
|
prerelease: false
|
64
37
|
version_requirements: !ruby/object:Gem::Requirement
|
65
38
|
requirements:
|
66
|
-
- - "
|
39
|
+
- - "~>"
|
67
40
|
- !ruby/object:Gem::Version
|
68
|
-
version: '5
|
41
|
+
version: '5'
|
69
42
|
- !ruby/object:Gem::Dependency
|
70
43
|
name: mocha
|
71
44
|
requirement: !ruby/object:Gem::Requirement
|
72
45
|
requirements:
|
73
46
|
- - "~>"
|
74
47
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
48
|
+
version: '1'
|
76
49
|
type: :development
|
77
50
|
prerelease: false
|
78
51
|
version_requirements: !ruby/object:Gem::Requirement
|
79
52
|
requirements:
|
80
53
|
- - "~>"
|
81
54
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: chalk-rake
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
55
|
+
version: '1'
|
97
56
|
- !ruby/object:Gem::Dependency
|
98
57
|
name: subprocess
|
99
58
|
requirement: !ruby/object:Gem::Requirement
|
100
59
|
requirements:
|
101
|
-
- - "
|
60
|
+
- - "~>"
|
102
61
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
62
|
+
version: '1'
|
104
63
|
type: :development
|
105
64
|
prerelease: false
|
106
65
|
version_requirements: !ruby/object:Gem::Requirement
|
107
66
|
requirements:
|
108
|
-
- - "
|
67
|
+
- - "~>"
|
109
68
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
69
|
+
version: '1'
|
111
70
|
description: Einhorn makes it easy to run multiple instances of an application server,
|
112
71
|
all listening on the same port. You can also seamlessly restart your workers without
|
113
72
|
dropping any requests. Einhorn requires minimal application-level support, making
|
114
73
|
it easy to use with an existing project.
|
115
74
|
email:
|
116
|
-
-
|
75
|
+
- support+github@stripe.com
|
76
|
+
- mperham@gmail.com
|
117
77
|
executables:
|
118
78
|
- einhorn
|
119
79
|
- einhornsh
|
120
80
|
extensions: []
|
121
81
|
extra_rdoc_files: []
|
122
82
|
files:
|
123
|
-
-
|
124
|
-
-
|
125
|
-
- CONTRIBUTORS
|
126
|
-
- Gemfile
|
127
|
-
- History.txt
|
128
|
-
- LICENSE
|
83
|
+
- Changes.md
|
84
|
+
- LICENSE.txt
|
129
85
|
- README.md
|
130
|
-
- README.md.in
|
131
|
-
- Rakefile
|
132
86
|
- bin/einhorn
|
133
87
|
- bin/einhornsh
|
134
88
|
- einhorn.gemspec
|
@@ -150,36 +104,19 @@ files:
|
|
150
104
|
- lib/einhorn/event/timer.rb
|
151
105
|
- lib/einhorn/prctl.rb
|
152
106
|
- lib/einhorn/prctl_linux.rb
|
107
|
+
- lib/einhorn/safe_yaml.rb
|
153
108
|
- lib/einhorn/third.rb
|
154
109
|
- lib/einhorn/version.rb
|
155
110
|
- lib/einhorn/worker.rb
|
156
111
|
- lib/einhorn/worker_pool.rb
|
157
|
-
|
158
|
-
- test/integration/_lib.rb
|
159
|
-
- test/integration/_lib/fixtures/env_printer/env_printer.rb
|
160
|
-
- test/integration/_lib/fixtures/exit_during_upgrade/exiting_server.rb
|
161
|
-
- test/integration/_lib/fixtures/exit_during_upgrade/upgrade_reexec.rb
|
162
|
-
- test/integration/_lib/fixtures/pdeathsig_printer/pdeathsig_printer.rb
|
163
|
-
- test/integration/_lib/fixtures/signal_timeout/sleepy_server.rb
|
164
|
-
- test/integration/_lib/fixtures/upgrade_project/upgrading_server.rb
|
165
|
-
- test/integration/_lib/helpers.rb
|
166
|
-
- test/integration/_lib/helpers/einhorn_helpers.rb
|
167
|
-
- test/integration/pdeathsig.rb
|
168
|
-
- test/integration/startup.rb
|
169
|
-
- test/integration/upgrading.rb
|
170
|
-
- test/unit/_lib/bad_worker.rb
|
171
|
-
- test/unit/_lib/sleep_worker.rb
|
172
|
-
- test/unit/einhorn.rb
|
173
|
-
- test/unit/einhorn/client.rb
|
174
|
-
- test/unit/einhorn/command.rb
|
175
|
-
- test/unit/einhorn/command/interface.rb
|
176
|
-
- test/unit/einhorn/event.rb
|
177
|
-
- test/unit/einhorn/worker_pool.rb
|
178
|
-
homepage: https://github.com/stripe/einhorn
|
112
|
+
homepage: https://github.com/contribsys/einhorn
|
179
113
|
licenses:
|
180
114
|
- MIT
|
181
|
-
metadata:
|
182
|
-
|
115
|
+
metadata:
|
116
|
+
bug_tracker_uri: https://github.com/contribsys/einhorn/issues
|
117
|
+
documentation_uri: https://github.com/contribsys/einhorn/wiki
|
118
|
+
changelog_uri: https://github.com/contribsys/einhorn/blob/main/Changes.md
|
119
|
+
post_install_message:
|
183
120
|
rdoc_options: []
|
184
121
|
require_paths:
|
185
122
|
- lib
|
@@ -187,36 +124,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
187
124
|
requirements:
|
188
125
|
- - ">="
|
189
126
|
- !ruby/object:Gem::Version
|
190
|
-
version:
|
127
|
+
version: 2.5.0
|
191
128
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
192
129
|
requirements:
|
193
130
|
- - ">="
|
194
131
|
- !ruby/object:Gem::Version
|
195
132
|
version: '0'
|
196
133
|
requirements: []
|
197
|
-
rubygems_version: 3.
|
198
|
-
signing_key:
|
134
|
+
rubygems_version: 3.2.32
|
135
|
+
signing_key:
|
199
136
|
specification_version: 4
|
200
137
|
summary: 'Einhorn: the language-independent shared socket manager'
|
201
|
-
test_files:
|
202
|
-
- test/_lib.rb
|
203
|
-
- test/integration/_lib.rb
|
204
|
-
- test/integration/_lib/fixtures/env_printer/env_printer.rb
|
205
|
-
- test/integration/_lib/fixtures/exit_during_upgrade/exiting_server.rb
|
206
|
-
- test/integration/_lib/fixtures/exit_during_upgrade/upgrade_reexec.rb
|
207
|
-
- test/integration/_lib/fixtures/pdeathsig_printer/pdeathsig_printer.rb
|
208
|
-
- test/integration/_lib/fixtures/signal_timeout/sleepy_server.rb
|
209
|
-
- test/integration/_lib/fixtures/upgrade_project/upgrading_server.rb
|
210
|
-
- test/integration/_lib/helpers.rb
|
211
|
-
- test/integration/_lib/helpers/einhorn_helpers.rb
|
212
|
-
- test/integration/pdeathsig.rb
|
213
|
-
- test/integration/startup.rb
|
214
|
-
- test/integration/upgrading.rb
|
215
|
-
- test/unit/_lib/bad_worker.rb
|
216
|
-
- test/unit/_lib/sleep_worker.rb
|
217
|
-
- test/unit/einhorn.rb
|
218
|
-
- test/unit/einhorn/client.rb
|
219
|
-
- test/unit/einhorn/command.rb
|
220
|
-
- test/unit/einhorn/command/interface.rb
|
221
|
-
- test/unit/einhorn/event.rb
|
222
|
-
- test/unit/einhorn/worker_pool.rb
|
138
|
+
test_files: []
|