This repository has been archived on 2023-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
2018-12-09 04:24:08 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
namespace :puma do
|
2018-12-09 04:59:03 +00:00
|
|
|
desc 'Stop Puma web server'
|
|
|
|
task :stop do
|
2018-12-09 04:24:08 +00:00
|
|
|
on roles(:web) do
|
|
|
|
within release_path do
|
|
|
|
statefile = File.join shared_path, 'tmp', 'pids', 'puma.state'
|
2018-12-09 04:59:03 +00:00
|
|
|
execute :bundle, :exec, :pumactl, '--state', statefile, :stop
|
2018-12-10 01:52:10 +00:00
|
|
|
rescue SSHKit::Command::Failed
|
|
|
|
nil
|
2018-12-09 04:24:08 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|