lib/negroku/capistrano/tasks/eye/puma.rake in negroku-2.7.1 vs lib/negroku/capistrano/tasks/eye/puma.rake in negroku-2.8.0
- old
+ new
@@ -1,21 +1,22 @@
#########
## Adds support to monitor puma processes through eye
#########
# Watch the puma processes using the build in template
-namespace :eye do
+namespace :puma do
task :watch_process do
-
- watch_process(:puma);
-
+ watch_process(:puma, start_timeout: fetch(:eye_puma_start_timeout, 60),
+ stop_timeout: fetch(:eye_puma_stop_timeout, 30),
+ restart_timeout: fetch(:eye_puma_restart_timeout, 30),
+ start_grace: fetch(:eye_puma_start_grace, 100),
+ stop_grace: fetch(:eye_puma_stop_grace, 30),
+ restart_grace: fetch(:eye_puma_restart_grace, 30))
end
-end
-# Override start, restart and stop puma tasks to so they call
-# the eye equivalents
-namespace :puma do
- ['start','restart','stop'].each do |cmd|
+ # Override start, restart and stop puma tasks to so they call
+ # the eye equivalents
+ ['start', 'restart', 'stop'].each do |cmd|
if Rake::Task.task_defined?("puma:#{cmd}")
Rake::Task["puma:#{cmd}"].clear_actions
# Reload or restart puma after the application is published
desc "using eye"
task cmd do