Permalink
Browse files

Merge branch 'master' of https://github.com/bluetools/delayed_job

* 'master' of https://github.com/bluetools/delayed_job:
  Add delayed_job_args variable for Capistrano recipe to allow configuration of started workers (e.g. "-n 2 --max-priority 10")
  • Loading branch information...
bkeepers committed Nov 12, 2010
2 parents 6d654ce + 08e498f commit d5beb84fa00999a4199a593830f9fc79c6a0255c
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/delayed/recipes.rb
View
@@ -13,19 +13,23 @@ def rails_env
fetch(:rails_env, false) ? "RAILS_ENV=#{fetch(:rails_env)}" : ''
end
+ def args
+ fetch(:delayed_job_args, "")
+ end
+
desc "Stop the delayed_job process"
task :stop, :roles => :app do
run "cd #{current_path};#{rails_env} script/delayed_job stop"
end
desc "Start the delayed_job process"
task :start, :roles => :app do
- run "cd #{current_path};#{rails_env} script/delayed_job start"
+ run "cd #{current_path};#{rails_env} script/delayed_job start #{args}"
end
desc "Restart the delayed_job process"
task :restart, :roles => :app do
- run "cd #{current_path};#{rails_env} script/delayed_job restart"
+ run "cd #{current_path};#{rails_env} script/delayed_job restart #{args}"
end
end
end

0 comments on commit d5beb84

Please sign in to comment.