mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Merge pull request #259 from fuJiin/capistrano-fix
Fix capistrano task for first deploys
This commit is contained in:
commit
66d3bf35fb
1 changed files with 2 additions and 2 deletions
|
@ -11,12 +11,12 @@ Capistrano::Configuration.instance.load do
|
||||||
|
|
||||||
desc "Quiet sidekiq (stop accepting new work)"
|
desc "Quiet sidekiq (stop accepting new work)"
|
||||||
task :quiet, :roles => lambda { fetch(:sidekiq_role) }, :on_no_matching_servers => :continue do
|
task :quiet, :roles => lambda { fetch(:sidekiq_role) }, :on_no_matching_servers => :continue do
|
||||||
run "cd #{current_path} && if [ -f #{current_path}/tmp/pids/sidekiq.pid ]; then #{fetch(:bundle_cmd, "bundle")} exec sidekiqctl quiet #{current_path}/tmp/pids/sidekiq.pid ; fi"
|
run "if [ -d #{current_path} ] && [ -f #{current_path}/tmp/pids/sidekiq.pid ]; then cd #{current_path} && #{fetch(:bundle_cmd, "bundle")} exec sidekiqctl quiet #{current_path}/tmp/pids/sidekiq.pid ; fi"
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Stop sidekiq"
|
desc "Stop sidekiq"
|
||||||
task :stop, :roles => lambda { fetch(:sidekiq_role) }, :on_no_matching_servers => :continue do
|
task :stop, :roles => lambda { fetch(:sidekiq_role) }, :on_no_matching_servers => :continue do
|
||||||
run "cd #{current_path} && if [ -f #{current_path}/tmp/pids/sidekiq.pid ]; then #{fetch(:bundle_cmd, "bundle")} exec sidekiqctl stop #{current_path}/tmp/pids/sidekiq.pid #{fetch :sidekiq_timeout} ; fi"
|
run "if [ -d #{current_path} ] && [ -f #{current_path}/tmp/pids/sidekiq.pid ]; then cd #{current_path} && #{fetch(:bundle_cmd, "bundle")} exec sidekiqctl stop #{current_path}/tmp/pids/sidekiq.pid #{fetch :sidekiq_timeout} ; fi"
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Start sidekiq"
|
desc "Start sidekiq"
|
||||||
|
|
Loading…
Reference in a new issue