Sha256: 1ea9080892060fbf63e17efe84d7ab45fa4f376832d9b32d1fb9f517957254a3
Contents?: true
Size: 922 Bytes
Versions: 1
Compression:
Stored size: 922 Bytes
Contents
Capistrano::Configuration.instance(true).load do set :memcache_init_path, "/etc/init.d/memcached" set :memcache_size, '64' set :memcache_port, '11211' set :memcache_host, '127.0.0.1' set :memcache_user, 'nobody' namespace :memcache do desc "Stops the memcache server" task :stop, :roles => :app do puts "Stopping the memcache server" try_sudo "killall -s TERM memcached" end desc "Starts the memcache server" task :start, :roles => :app do puts "Starting the memcache server" try_sudo "memcached -m #{memcache_size} -p #{memcache_port} -l #{memcache_host} -u #{memcache_user}" end desc "Restarts the memcache server" task :restart, :roles => :app do puts "Restarting the memcache server" memcache.stop sleep(3) # sleep for 3 seconds to make sure the server has mopped up everything memcache.start end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nesquena-cap-recipes-0.3.3 | lib/cap_recipes/tasks/memcache/manage.rb |