Skip to content

Instantly share code, notes, and snippets.

@ralph
Created March 20, 2010 17:58
Show Gist options
  • Save ralph/338799 to your computer and use it in GitHub Desktop.
Save ralph/338799 to your computer and use it in GitHub Desktop.
# Capistrano Recipes for managing delayed_job on SUN Solaris
#
# Add these callbacks to have the delayed_job process restart when the server
# is restarted:
#
# after "deploy:stop", "delayed_job:stop"
# after "deploy:start", "delayed_job:start"
# after "deploy:restart", "delayed_job:restart"
Capistrano::Configuration.instance.load do
namespace :delayed_job do
desc "Stop the delayed_job process"
task :stop, :roles => :app do
sudo "svcadm disable xxx_delayed_job"
end
desc "Start the delayed_job process"
task :start, :roles => :app do
sudo "svcadm enable xxx_delayed_job"
end
desc "Restart the delayed_job process"
task :restart, :roles => :app do
sudo "svcadm restart xxx_delayed_job"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment