Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added capistrano tasks for managing the delayed_job process

  • Loading branch information...
commit c720c14737c14704304a4240997699ee37006c1f 1 parent d6d0a92
@bkeepers bkeepers authored
Showing with 26 additions and 0 deletions.
  1. +26 −0 recipes/delayed_job.rb
View
26 recipes/delayed_job.rb
@@ -0,0 +1,26 @@
+# Capistrano Recipes for managing delayed_job
+#
+# 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"
+
+
+namespace :delayed_job do
+ desc "Stop the delayed_job process"
+ task :stop, :roles => :app do
+ run "cd #{current_path}; script/delayed_job -e #{rails_env} stop"
+ end
+
+ desc "Start the delayed_job process"
+ task :start, :roles => :app do
+ run "cd #{current_path}; script/delayed_job -e #{rails_env} start"
+ end
+
+ desc "Restart the Ferret DRb server"
+ task :restart, :roles => :app do
+ run "cd #{current_path}; script/delayed_job -e #{rails_env} restart"
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.