Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use current_path for memcached.php, and do not run unless we actually…

… have memcached servers specified
  • Loading branch information...
commit 561bff8002c319cddffe4cbf64a6fd33165a3308 1 parent 3a9a4fb
@markjaquith authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 Capistrano/lib/tasks.rb
View
7 Capistrano/lib/tasks.rb
@@ -36,9 +36,10 @@
end
desc "Updates the pool of memcached servers"
task :update do
- mc_servers = '<?php return array( "' + find_servers( :roles => :memcached ).join( ':11211", "' ) + ':11211" ); ?>'
- shared.make_shared_dir
- run "echo '#{mc_servers}' > #{release_path}/memcached.php", :roles => :memcached
+ unless find_servers( :roles => :memcached ).empty? then
+ mc_servers = '<?php return array( "' + find_servers( :roles => :memcached ).join( ':11211", "' ) + ':11211" ); ?>'
+ run "echo '#{mc_servers}' > #{current_path}/memcached.php", :roles => :memcached
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.