einhorn 1.0.1 → 1.1.0
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/Changes.md +8 -0
- data/README.md +1 -1
- data/bin/einhorn +8 -0
- data/einhorn.gemspec +4 -1
- data/lib/einhorn/command/interface.rb +1 -1
- data/lib/einhorn/prctl_linux.rb +1 -0
- data/lib/einhorn/version.rb +1 -1
- data/lib/einhorn.rb +2 -1
- metadata +22 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7c72e94fac54aab8b659b1a0f0541f0be46a11dfc50741c14cc76b2ec724f813
|
|
4
|
+
data.tar.gz: 2feaded9e2d03cdafaa7627966873d1e4dd3690645aa210e7b2a5d02a03dd2c0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b34e73f9444fae30f6b799d4686caa30040a8c3cdd8bfa6be4b65c3c4b6fb1ec18c3d676df97fa697621878b4da1e9ad9398fe1a05760b6bef7c6ed2cc82d936
|
|
7
|
+
data.tar.gz: 699d684f1a97051f83f7047a4ec43a55ac7c96f939f9d92513d0c36dbcfc9cfed3133b077f0160de5f5f132907b8778471a2d1091e8c27f1edd91b4d3ea14bfd
|
data/Changes.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
# 1.1.0
|
|
2
|
+
|
|
3
|
+
- Add `logger` and `readline` gem dependencies for Ruby 4.0
|
|
4
|
+
- Make the `fiddle` gem dependency optional.
|
|
5
|
+
This gem is only necessary if you use the `-k` flag and since
|
|
6
|
+
it is native, requires libffi and a compiler to be installed.
|
|
7
|
+
Add `gem "fiddle"` to your Gemfile to use the `-k` flag.
|
|
8
|
+
|
|
1
9
|
# 1.0.1
|
|
2
10
|
|
|
3
11
|
- Add `fiddle` to gemspec dependencies [#111]
|
data/README.md
CHANGED
|
@@ -200,7 +200,7 @@ Then you could set `--reexec-as=` to the name of your bash script and it will ru
|
|
|
200
200
|
-f, --lockfile LOCKFILE Where to store the Einhorn lockfile
|
|
201
201
|
-g, --command-socket-as-fd Leave the command socket open as a file descriptor, passed in the EINHORN_SOCK_FD environment variable. This allows your worker processes to ACK without needing to know where on the filesystem the command socket lives.
|
|
202
202
|
-h, --help Display this message
|
|
203
|
-
-k, --kill-children-on-exit If Einhorn exits unexpectedly, gracefully kill all its children
|
|
203
|
+
-k, --kill-children-on-exit If Einhorn exits unexpectedly, gracefully kill all its children (linux only, requires the fiddle gem)
|
|
204
204
|
-l, --backlog N Connection backlog (assuming this is a server)
|
|
205
205
|
-m, --ack-mode MODE What kinds of ACK to expect from workers. Choices: FLOAT (number of seconds until assumed alive), manual (process will speak to command socket when ready). Default is MODE=1.
|
|
206
206
|
-n, --number N Number of copies to spin up
|
data/bin/einhorn
CHANGED
|
@@ -227,6 +227,14 @@ if true # $0 == __FILE__
|
|
|
227
227
|
end
|
|
228
228
|
|
|
229
229
|
opts.on('-k', '--kill-children-on-exit', 'If Einhorn exits unexpectedly, gracefully kill all its children') do
|
|
230
|
+
# Fiddle is only necessary for this feature flag.
|
|
231
|
+
# Since fiddle is our only native dependency and we don't want to force
|
|
232
|
+
# a compiler on everyone, we make it optional.
|
|
233
|
+
begin
|
|
234
|
+
require "fiddle"
|
|
235
|
+
rescue LoadError
|
|
236
|
+
warn "Please add `gem 'fiddle'` to your Gemfile to use einhorn's -k flag"
|
|
237
|
+
end
|
|
230
238
|
Einhorn::State.kill_children_on_exit = true
|
|
231
239
|
end
|
|
232
240
|
|
data/einhorn.gemspec
CHANGED
|
@@ -25,5 +25,8 @@ Gem::Specification.new do |gem|
|
|
|
25
25
|
gem.add_development_dependency "minitest", "~> 5"
|
|
26
26
|
gem.add_development_dependency "mocha", "~> 2"
|
|
27
27
|
gem.add_development_dependency "subprocess", "~> 1"
|
|
28
|
-
|
|
28
|
+
# Fiddle is native and only needed for `-k` on Linux so we make it optional
|
|
29
|
+
# gem.add_dependency "fiddle", "~> 1.1"
|
|
30
|
+
gem.add_dependency "logger"
|
|
31
|
+
gem.add_dependency "readline"
|
|
29
32
|
end
|
|
@@ -297,7 +297,7 @@ module Einhorn::Command
|
|
|
297
297
|
# Used by einhornsh
|
|
298
298
|
command "ehlo" do |conn, request|
|
|
299
299
|
<<~EOF
|
|
300
|
-
Welcome, #{request["user"]}! You are speaking to Einhorn Master Process #{$$}#{
|
|
300
|
+
Welcome, #{request["user"]}! You are speaking to Einhorn Master Process #{$$}#{" (#{Einhorn::State.cmd_name})" if Einhorn::State.cmd_name}.
|
|
301
301
|
This is Einhorn #{Einhorn::VERSION}.
|
|
302
302
|
EOF
|
|
303
303
|
end
|
data/lib/einhorn/prctl_linux.rb
CHANGED
data/lib/einhorn/version.rb
CHANGED
data/lib/einhorn.rb
CHANGED
|
@@ -94,6 +94,7 @@ module Einhorn
|
|
|
94
94
|
|
|
95
95
|
module TransientState
|
|
96
96
|
extend AbstractState
|
|
97
|
+
|
|
97
98
|
def self.default_state
|
|
98
99
|
{
|
|
99
100
|
whatami: :master,
|
|
@@ -307,7 +308,7 @@ module Einhorn
|
|
|
307
308
|
end
|
|
308
309
|
|
|
309
310
|
ARGV[0..-1] = cmd[idx + 1..-1]
|
|
310
|
-
log_info("Set#{
|
|
311
|
+
log_info("Set#{" $0 = #{$0.inspect}, " if set_ps_name} ARGV = #{ARGV.inspect}")
|
|
311
312
|
end
|
|
312
313
|
|
|
313
314
|
def self.set_master_ps_name
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: einhorn
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stripe
|
|
8
8
|
- Mike Perham
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -67,19 +67,33 @@ dependencies:
|
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '1'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
|
-
name:
|
|
70
|
+
name: logger
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
|
-
- - "
|
|
73
|
+
- - ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: '
|
|
75
|
+
version: '0'
|
|
76
76
|
type: :runtime
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
|
-
- - "
|
|
80
|
+
- - ">="
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: readline
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - ">="
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '0'
|
|
90
|
+
type: :runtime
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - ">="
|
|
81
95
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: '
|
|
96
|
+
version: '0'
|
|
83
97
|
description: Einhorn makes it easy to run multiple instances of an application server,
|
|
84
98
|
all listening on the same port. You can also seamlessly restart your workers without
|
|
85
99
|
dropping any requests. Einhorn requires minimal application-level support, making
|
|
@@ -143,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
143
157
|
- !ruby/object:Gem::Version
|
|
144
158
|
version: '0'
|
|
145
159
|
requirements: []
|
|
146
|
-
rubygems_version:
|
|
160
|
+
rubygems_version: 4.0.6
|
|
147
161
|
specification_version: 4
|
|
148
162
|
summary: 'Einhorn: the language-independent shared socket manager'
|
|
149
163
|
test_files: []
|