Cross Reference: sidekiq.cap
xref
: /
httpd
/
docs
/
manual
/
programs
/
configure.html
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
2
ronwalf
2
ronwalf
namespace :sidekiq do
2
ronwalf
2
ronwalf
def kill(signal)
2
ronwalf
on roles(:app) do
2
ronwalf
execute "kill -s #{signal} `cat #{current_path}
/tmp/pids/sidekiq
*.pid` || true"
2
ronwalf
end
2
ronwalf
end
2
ronwalf
2
ronwalf
desc "Stop sidekiq"
2
ronwalf
task :stop do
2
ronwalf
kill :TERM
2
ronwalf
end
2
ronwalf
2
ronwalf
desc "Suspend sidekiq (stop accepting new work)"
2
ronwalf
task :suspend do
2
ronwalf
kill :USR1
2
ronwalf
end
2
ronwalf
2
ronwalf
after 'deploy:starting', 'sidekiq:suspend'
2
ronwalf
2
ronwalf
# god:terminate does this job already
2
ronwalf
#after 'deploy:publishing', 'sidekiq:stop'
2
ronwalf
2
ronwalf
end
2
ronwalf