einhorn 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8dd68fe54324e7abf44e651b0841e8d39454aee1
4
+ data.tar.gz: edb62157f36f162ec5c27392fb03fa7651d8052a
5
+ SHA512:
6
+ metadata.gz: 9f6ee548ff87a39a3475b9259f72b11f5209cf4146c038ef431e059d2d10f6a1c8c4283987a861c998b0b397219822c7802e17bfceaa61b180966d17120e1d17
7
+ data.tar.gz: c2bc5eae5def2f598c2777c71b58bf321adc72adf652c2ee71bbbeec1e2acd75c0e41225c69fb9e800c62872ffac860bb4c6f87119cb4a9acfd0799231d89d9a
data/bin/einhorn CHANGED
@@ -309,6 +309,10 @@ if true # $0 == __FILE__
309
309
  exit 0
310
310
  end
311
311
 
312
+ opts.on('--signal-timeout=T', '-t', 'If children do not react to signals after T seconds, escalate to SIGKILL') do |t|
313
+ Einhorn::State.signal_timeout = Integer(t)
314
+ end
315
+
312
316
  opts.on('--version', 'Show version') do
313
317
  puts Einhorn::VERSION
314
318
  exit
@@ -123,6 +123,21 @@ module Einhorn
123
123
  end
124
124
  end
125
125
 
126
+ if Einhorn::State.signal_timeout
127
+ Einhorn::Event::Timer.open(Einhorn::State.signal_timeout) do
128
+ children.each do |child|
129
+ next unless spec = Einhorn::State.children[child]
130
+
131
+ Einhorn.log_info("Child #{child.inspect} is still active after #{Einhorn::State.signal_timeout}. Sending SIGKILL.")
132
+ begin
133
+ Process.kill('KILL', child)
134
+ rescue Errno::ESRCH
135
+ end
136
+ spec[:signaled].add('KILL')
137
+ end
138
+ end
139
+ end
140
+
126
141
  "Successfully sent #{signal}s to #{signaled.length} processes: #{signaled.inspect}"
127
142
  end
128
143
 
@@ -1,3 +1,3 @@
1
1
  module Einhorn
2
- VERSION = '0.6.3'
2
+ VERSION = '0.6.4'
3
3
  end
data/lib/einhorn.rb CHANGED
@@ -78,6 +78,7 @@ module Einhorn
78
78
  :nice => {:master => nil, :worker => nil, :renice_cmd => '/usr/bin/renice'},
79
79
  :reexec_commandline => nil,
80
80
  :drop_environment_variables => [],
81
+ :signal_timeout => nil,
81
82
  }
82
83
  end
83
84
 
metadata CHANGED
@@ -1,110 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: einhorn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
5
- prerelease:
4
+ version: 0.6.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Greg Brockman
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-09-23 00:00:00.000000000 Z
11
+ date: 2015-06-24 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rake
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: pry
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: minitest
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - <
45
+ - - "<"
52
46
  - !ruby/object:Gem::Version
53
47
  version: '5.0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - <
52
+ - - "<"
60
53
  - !ruby/object:Gem::Version
61
54
  version: '5.0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: mocha
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ~>
59
+ - - "~>"
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0.13'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ~>
66
+ - - "~>"
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0.13'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: chalk-rake
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - ">="
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - ">="
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: subprocess
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - ">="
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - ">="
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  description: Einhorn makes it easy to run multiple instances of an application server,
@@ -119,8 +106,8 @@ executables:
119
106
  extensions: []
120
107
  extra_rdoc_files: []
121
108
  files:
122
- - .gitignore
123
- - .travis.yml
109
+ - ".gitignore"
110
+ - ".travis.yml"
124
111
  - CONTRIBUTORS
125
112
  - Gemfile
126
113
  - History.txt
@@ -179,28 +166,27 @@ files:
179
166
  homepage: https://github.com/stripe/einhorn
180
167
  licenses:
181
168
  - MIT
169
+ metadata: {}
182
170
  post_install_message:
183
171
  rdoc_options: []
184
172
  require_paths:
185
173
  - lib
186
174
  required_ruby_version: !ruby/object:Gem::Requirement
187
- none: false
188
175
  requirements:
189
- - - ! '>='
176
+ - - ">="
190
177
  - !ruby/object:Gem::Version
191
178
  version: '0'
192
179
  required_rubygems_version: !ruby/object:Gem::Requirement
193
- none: false
194
180
  requirements:
195
- - - ! '>='
181
+ - - ">="
196
182
  - !ruby/object:Gem::Version
197
183
  version: '0'
198
184
  requirements: []
199
185
  rubyforge_project:
200
- rubygems_version: 1.8.23
186
+ rubygems_version: 2.2.2
201
187
  signing_key:
202
- specification_version: 3
203
- summary: ! 'Einhorn: the language-independent shared socket manager'
188
+ specification_version: 4
189
+ summary: 'Einhorn: the language-independent shared socket manager'
204
190
  test_files:
205
191
  - test/_lib.rb
206
192
  - test/integration/_lib.rb
@@ -218,4 +204,3 @@ test_files:
218
204
  - test/unit/einhorn/command/interface.rb
219
205
  - test/unit/einhorn/event.rb
220
206
  - test/unit/einhorn/worker_pool.rb
221
- has_rdoc: