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