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.47 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.46 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.45 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.44 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.43 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.42 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.41 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.40 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.39 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.38 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.37 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.36 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.35 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.34 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.33 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.32 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.31 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.30 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.29 lib/capistrano-deploy-management/memcached.rb
capistrano-deploy-management-0.1.28 lib/capistrano-deploy-management/memcached.rb