-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cap deploy old style but stop and start
- Loading branch information
Showing
6 changed files
with
61 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,46 @@ | ||
# namespace :delayed_job do | ||
# | ||
# def args | ||
# fetch(:delayed_job_args, "") | ||
# end | ||
# | ||
# def delayed_job_roles | ||
# fetch(:delayed_job_server_role, :app) | ||
# end | ||
# | ||
# desc 'Stop the delayed_job process' | ||
# task :stop do | ||
# on roles(delayed_job_roles) do | ||
# within release_path do | ||
# with rails_env: fetch(:rails_env) do | ||
# test :bundle, :exec, :'bin/delayed_job', :stop | ||
# end | ||
# end | ||
# end | ||
# end | ||
# | ||
# desc 'Start the delayed_job process' | ||
# task :start do | ||
# on roles(delayed_job_roles) do | ||
# within release_path do | ||
# with rails_env: fetch(:rails_env) do | ||
# execute :bundle, :exec, :'bin/delayed_job', args, :start | ||
# end | ||
# end | ||
# end | ||
# end | ||
# | ||
# desc 'Restart the delayed_job process' | ||
# task :restart do | ||
# on roles(delayed_job_roles) do | ||
# within release_path do | ||
# with rails_env: fetch(:rails_env) do | ||
# execute :bundle, :exec, :'bin/delayed_job', args, :restart | ||
# end | ||
# end | ||
# end | ||
# end | ||
# | ||
# end | ||
# from https://github.com/collectiveidea/delayed_job/wiki/Delayed-Job-tasks-for-Capistrano-3 | ||
|
||
namespace :delayed_job do | ||
|
||
def args | ||
fetch(:delayed_job_args, "") | ||
end | ||
|
||
def delayed_job_roles | ||
fetch(:delayed_job_server_role, :app) | ||
end | ||
|
||
desc 'Stop the delayed_job process' | ||
task :stop do | ||
on roles(delayed_job_roles) do | ||
within release_path do | ||
with rails_env: fetch(:rails_env) do | ||
test :bundle, :exec, :'bin/delayed_job', :stop | ||
end | ||
end | ||
end | ||
end | ||
|
||
desc 'Start the delayed_job process' | ||
task :start do | ||
on roles(delayed_job_roles) do | ||
within release_path do | ||
with rails_env: fetch(:rails_env) do | ||
execute :bundle, :exec, :'bin/delayed_job', args, :start | ||
end | ||
end | ||
end | ||
end | ||
|
||
desc 'Restart the delayed_job process' | ||
task :restart do | ||
on roles(delayed_job_roles) do | ||
within release_path do | ||
with rails_env: fetch(:rails_env) do | ||
execute :bundle, :exec, :'bin/delayed_job', args, :restart | ||
end | ||
end | ||
end | ||
end | ||
|
||
end |