puma 2.2.0-java → 2.2.1-java
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puma might be problematic. Click here for more details.
- data/Gemfile +1 -0
- data/lib/puma/cli.rb +17 -9
- data/lib/puma/const.rb +1 -1
- data/puma.gemspec +1 -1
- metadata +1 -1
data/Gemfile
CHANGED
data/lib/puma/cli.rb
CHANGED
@@ -96,6 +96,14 @@ module Puma
|
|
96
96
|
end
|
97
97
|
end
|
98
98
|
|
99
|
+
def restart_args
|
100
|
+
if cmd = @options[:restart_cmd]
|
101
|
+
cmd.split(' ') + @original_argv
|
102
|
+
else
|
103
|
+
@restart_argv
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
99
107
|
def restart!
|
100
108
|
@options[:on_restart].each do |blk|
|
101
109
|
blk.call self
|
@@ -114,7 +122,7 @@ module Puma
|
|
114
122
|
end
|
115
123
|
|
116
124
|
require 'puma/jruby_restart'
|
117
|
-
JRubyRestart.chdir_exec(@restart_dir,
|
125
|
+
JRubyRestart.chdir_exec(@restart_dir, restart_args)
|
118
126
|
else
|
119
127
|
redirects = {:close_others => true}
|
120
128
|
@binder.listeners.each_with_index do |(l,io),i|
|
@@ -122,11 +130,7 @@ module Puma
|
|
122
130
|
redirects[io.to_i] = io.to_i
|
123
131
|
end
|
124
132
|
|
125
|
-
|
126
|
-
argv = cmd.split(' ') + @original_argv
|
127
|
-
else
|
128
|
-
argv = @restart_argv
|
129
|
-
end
|
133
|
+
argv = restart_args
|
130
134
|
|
131
135
|
Dir.chdir @restart_dir
|
132
136
|
|
@@ -236,6 +240,10 @@ module Puma
|
|
236
240
|
@options[:pidfile] = arg
|
237
241
|
end
|
238
242
|
|
243
|
+
o.on "--preload", "Preload the app. Cluster mode only" do
|
244
|
+
@options[:preload_app] = true
|
245
|
+
end
|
246
|
+
|
239
247
|
o.on "-q", "--quiet", "Quiet down the output" do
|
240
248
|
@options[:quiet] = true
|
241
249
|
end
|
@@ -292,7 +300,7 @@ module Puma
|
|
292
300
|
end
|
293
301
|
end
|
294
302
|
|
295
|
-
def set_rack_environment
|
303
|
+
def set_rack_environment
|
296
304
|
# Try the user option first, then the environment variable,
|
297
305
|
# finally default to development
|
298
306
|
|
@@ -323,7 +331,7 @@ module Puma
|
|
323
331
|
state = { "pid" => Process.pid }
|
324
332
|
|
325
333
|
cfg = @config.dup
|
326
|
-
|
334
|
+
|
327
335
|
[ :logger, :worker_boot, :on_restart ].each { |o| cfg.options.delete o }
|
328
336
|
|
329
337
|
state["config"] = cfg
|
@@ -504,7 +512,7 @@ module Puma
|
|
504
512
|
exit
|
505
513
|
end
|
506
514
|
|
507
|
-
pid = JRubyRestart.daemon_start(@restart_dir,
|
515
|
+
pid = JRubyRestart.daemon_start(@restart_dir, restart_args)
|
508
516
|
sleep
|
509
517
|
end
|
510
518
|
else
|
data/lib/puma/const.rb
CHANGED
data/puma.gemspec
CHANGED