From 02b1725eaf6b4796f5a951ea3f2df27387527d44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 2 Apr 2024 23:35:45 +0200 Subject: [PATCH] Remove task to stop the puma daemon This task was necessary when updating to version 2.1.0, when we integrated Puma with Systemd. Now that all Consul Democracy installations are using Systemd, we no longer need it. --- config/deploy.rb | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/config/deploy.rb b/config/deploy.rb index 4657864a1..541cf52c5 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -69,7 +69,6 @@ namespace :deploy do after "deploy:migrate", "add_new_settings" after :publishing, "setup_puma" - before "puma:smart_restart", "stop_puma_daemon" after :finished, "refresh_sitemap" desc "Deploys and runs the tasks needed to upgrade to a new release" @@ -178,20 +177,3 @@ task :setup_puma do after "setup_puma", "puma:systemd:config" after "setup_puma", "puma:systemd:enable" end - -# Code adapted from the task to stop the daemon in capistrano3-puma -desc "Stops the Puma daemon so systemd can start the Puma process" -task :stop_puma_daemon do - on roles(fetch(:puma_role)) do |role| - within release_path do - with rails_env: fetch(:rails_env) do - if test("[ -f #{fetch(:puma_pid)} ]") && - !test("systemctl --user is-active #{fetch(:puma_service_unit_name)}") && - test(:kill, "-0 $( cat #{fetch(:puma_pid)} )") - info "Puma: stopping daemon" - execute :pumactl, "-S #{fetch(:puma_state)} -F #{fetch(:puma_conf)} stop" - end - end - end - end -end