Restart the application on deploy:restart

The task `deploy:restart` was doing nothing since we moved from unicorn
to puma.

Now we're also restarting delayed jobs on `deploy:restart`, which is
probably what's expected in most cases.
This commit is contained in:
Javi Martín
2019-11-17 22:55:42 +01:00
parent 69b4740ec8
commit 755bc8e88a
2 changed files with 6 additions and 7 deletions

View File

@@ -13,7 +13,7 @@ require "whenever/capistrano"
require "rvm1/capistrano3" require "rvm1/capistrano3"
require "capistrano/puma" require "capistrano/puma"
install_plugin Capistrano::Puma install_plugin Capistrano::Puma, load_hooks: false
#SCM: Git #SCM: Git
require "capistrano/scm/git" require "capistrano/scm/git"

View File

@@ -45,8 +45,6 @@ set(:config_files, %w[
set :whenever_roles, -> { :app } set :whenever_roles, -> { :app }
namespace :deploy do namespace :deploy do
Rake::Task["puma:check"].clear_actions
after :updating, "rvm1:install:rvm" after :updating, "rvm1:install:rvm"
after :updating, "rvm1:install:ruby" after :updating, "rvm1:install:ruby"
after :updating, "install_bundler_gem" after :updating, "install_bundler_gem"
@@ -55,12 +53,13 @@ namespace :deploy do
after "deploy:migrate", "add_new_settings" after "deploy:migrate", "add_new_settings"
before :publishing, "smtp_ssl_and_delay_jobs_secrets" before :publishing, "smtp_ssl_and_delay_jobs_secrets"
after :publishing, "setup_puma"
after :publishing, "deploy:restart" after :published, "deploy:restart"
after :published, "delayed_job:restart" before "deploy:restart", "puma:smart_restart"
after :published, "refresh_sitemap" before "deploy:restart", "delayed_job:restart"
before "deploy:restart", "setup_puma" after :finished, "refresh_sitemap"
desc "Deploys and runs the tasks needed to upgrade to a new release" desc "Deploys and runs the tasks needed to upgrade to a new release"
task :upgrade do task :upgrade do