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:
2
Capfile
2
Capfile
@@ -13,7 +13,7 @@ require "whenever/capistrano"
|
||||
require "rvm1/capistrano3"
|
||||
|
||||
require "capistrano/puma"
|
||||
install_plugin Capistrano::Puma
|
||||
install_plugin Capistrano::Puma, load_hooks: false
|
||||
|
||||
#SCM: Git
|
||||
require "capistrano/scm/git"
|
||||
|
||||
@@ -45,8 +45,6 @@ set(:config_files, %w[
|
||||
set :whenever_roles, -> { :app }
|
||||
|
||||
namespace :deploy do
|
||||
Rake::Task["puma:check"].clear_actions
|
||||
|
||||
after :updating, "rvm1:install:rvm"
|
||||
after :updating, "rvm1:install:ruby"
|
||||
after :updating, "install_bundler_gem"
|
||||
@@ -55,12 +53,13 @@ namespace :deploy do
|
||||
after "deploy:migrate", "add_new_settings"
|
||||
|
||||
before :publishing, "smtp_ssl_and_delay_jobs_secrets"
|
||||
after :publishing, "setup_puma"
|
||||
|
||||
after :publishing, "deploy:restart"
|
||||
after :published, "delayed_job:restart"
|
||||
after :published, "refresh_sitemap"
|
||||
after :published, "deploy:restart"
|
||||
before "deploy:restart", "puma:smart_restart"
|
||||
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"
|
||||
task :upgrade do
|
||||
|
||||
Reference in New Issue
Block a user