From: Neil Smith Date: Mon, 9 Mar 2009 13:45:07 +0000 (+0000) Subject: Fixed mongrel cluster restart tasks for capistrano X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;h=bf9f26790711c76f1c57b70d02a7276db14d1351;p=depot.git Fixed mongrel cluster restart tasks for capistrano --- diff --git a/config/deploy.rb b/config/deploy.rb index 455718d..182ca5d 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -27,13 +27,31 @@ task :configure_database, :roles => :app do end # Define the user for running and stopping server sub-proceses (Mongrel, etc.) -# set :runner, :user +set :runner, :neil -# As we're not running any other server processes (FastCGI, Mongrel, etc.), -# we don't need to start and stop them. +## As we're not running any other server processes (FastCGI, Mongrel, etc.), +## we don't need to start and stop them. +#namespace :deploy do +# [:start, :stop, :restart].each do |t| +# desc "#{t} task is a no-op with mod_rails" +# task t, :roles => :app do ; end +# end +#end + +# Custom tasks for starting and restarting Mongrel cluster namespace :deploy do - [:start, :stop, :restart].each do |t| - desc "#{t} task is a no-op with mod_rails" - task t, :roles => :app do ; end + desc "start the mongrel cluster" + task :start, :roles => :app do + sudo "/usr/bin/mongrel_cluster_ctl start" + end + + desc "stop the mongrel cluster" + task :stop, :roles => :app do + sudo "/usr/bin/mongrel_cluster_ctl stop" end -end \ No newline at end of file + + desc "restart the mongrel cluster" + task :restart, :roles => :app do + sudo "/usr/bin/mongrel_cluster_ctl restart" + end +end