From d0dbb16d72ffd9bfe4f35a663c95e271a8820d15 Mon Sep 17 00:00:00 2001 From: voodoorai2000 Date: Fri, 21 Sep 2018 18:11:21 +0200 Subject: [PATCH] Add unicorn restart task to deploy namespace --- lib/capistrano/tasks/restart.cap | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/capistrano/tasks/restart.cap b/lib/capistrano/tasks/restart.cap index 787191056..30740e3a7 100644 --- a/lib/capistrano/tasks/restart.cap +++ b/lib/capistrano/tasks/restart.cap @@ -1,8 +1,10 @@ -desc 'Restart Unicorn' -task :restart do - on roles(:app) do - execute "kill -QUIT `cat /home/deploy/consul/pids/unicorn.pid`; true" - execute "kill -QUIT `cat /home/deploy/consul/shared/pids/unicorn.pid`; true" - execute "cd /home/deploy/consul/current && /home/deploy/.rvm/gems/ruby-2.3.2/wrappers/unicorn -c config/unicorn.rb -E production -D" - end +namespace :deploy do + desc 'Restart Unicorn' + task :restart do + on roles(:app) do + execute "kill -QUIT `cat /home/deploy/consul/pids/unicorn.pid`; true" + execute "kill -QUIT `cat /home/deploy/consul/shared/pids/unicorn.pid`; true" + execute "cd /home/deploy/consul/current && /home/deploy/.rvm/gems/ruby-2.3.2/wrappers/unicorn -c config/unicorn.rb -E production -D" + end + end end \ No newline at end of file