From 6beeb86f408fdff13ffa5f8e4b85615da2b18727 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Mon, 10 Dec 2018 06:52:10 +0500 Subject: [PATCH] Fix error --- lib/capistrano/tasks/puma.rake | 2 ++ lib/capistrano/tasks/sidekiq.rake | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/capistrano/tasks/puma.rake b/lib/capistrano/tasks/puma.rake index 2ecc52e..66faf14 100644 --- a/lib/capistrano/tasks/puma.rake +++ b/lib/capistrano/tasks/puma.rake @@ -7,6 +7,8 @@ namespace :puma do within release_path do statefile = File.join shared_path, 'tmp', 'pids', 'puma.state' execute :bundle, :exec, :pumactl, '--state', statefile, :stop + rescue SSHKit::Command::Failed + nil end end end diff --git a/lib/capistrano/tasks/sidekiq.rake b/lib/capistrano/tasks/sidekiq.rake index ac85e51..b19fa32 100644 --- a/lib/capistrano/tasks/sidekiq.rake +++ b/lib/capistrano/tasks/sidekiq.rake @@ -7,6 +7,8 @@ namespace :sidekiq do within release_path do pidfile = File.join shared_path, 'tmp', 'pids', 'sidekiq.pid' execute :bundle, :exec, :sidekiqctl, :stop, pidfile + rescue SSHKit::Command::Failed + nil end end end