Sha256: 468d21e141ee520edaddc1aa35f8127488c4accd1f68646b243814365bc64195

Contents?: true

Size: 903 Bytes

Versions: 45

Compression:

Stored size: 903 Bytes

Contents

module CapistranoDeployManagement
  module Memcached
    def self.load_into(configuration)
      configuration.load do

        namespace :deploy do
          namespace :memcached do
            desc "Restart the Memcache daemon."
            task :restart, :roles => :app do
              deploy.memcached.stop
              deploy.memcached.start
            end

            desc "Start the Memcache daemon."
            task :start, :roles => :app do
              invoke_command "memcached -P #{current_path}/shared/log/memcached.pid -d", :via => run_method
            end

            desc "Stop the Memcache daemon."
            task :stop, :roles => :app do
              pid_file = "#{current_path}/shared/log/memcached.pid"
              invoke_command("killall -9 memcached", :via => run_method) if File.exist?(pid_file)
            end
          end
        end

      end
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
capistrano-deploy-management-0.1.25 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.24 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.23 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.22 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.21 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.20 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.19 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.18 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.17 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.16 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.15 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.14 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.13 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.12 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.11 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.10 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.9 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.8 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.7 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.6 lib/capistrano-deploy-management/memcached.rb