Sha256: 89b7b2ac6d513d5e08fe8daabcb591d5bf124c55e6db7f483413ba16611de106

Contents?: true

Size: 1.62 KB

Versions: 11

Compression:

Stored size: 1.62 KB

Contents

Capistrano::Configuration.instance(true).load do
  set :juggernaut_config, "#{current_path}/config/juggernaut.yml"
  set :juggernaut_pid, "#{current_path}/tmp/pids/juggernaut.pid"
  set :juggernaut_log, "#{current_path}/log/juggernaut.log"
  
  namespace :juggernaut do   
             
    # ===============================================================
    # PROCESS MANAGEMENT
    # ===============================================================  
    
    desc "Starts the juggernaut push server"
    task :start, :roles => :app do
      puts "Starting juggernaut push server"
      try_sudo "juggernaut -c #{juggernaut_config} -d --pid #{juggernaut_pid} --log #{juggernaut_log}"
    end
    
    desc "Stops the juggernaut push server"
    task :stop, :roles => :app do
      puts "Stopping juggernaut push server"
      try_sudo "juggernaut -c #{juggernaut_config} -k * --pid #{juggernaut_pid} --log #{juggernaut_log}" 
    end
    
    desc "Restarts the juggernaut push server"
    task :restart, :roles => :app do
      juggernaut.stop
      juggernaut.start
    end  
    
    # ===============================================================
    # FILE MANAGEMENT
    # ===============================================================  
    
    desc "Symlinks the shared/config/juggernaut yaml to release/config/"
    task :symlink_config, :roles => :app do
      try_sudo "ln -s #{shared_path}/config/juggernaut.yml #{release_path}/config/juggernaut.yml"
    end
    
    desc "Displays the juggernaut log from the server"
    task :tail, :roles => :app do
      stream "tail -f #{shared_path}/log/juggernaut.log" 
    end
    
  end
  
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
grosser-cap-recipes-0.2.19 lib/cap_recipes/tasks/juggernaut/manage.rb
grosser-cap-recipes-0.2.21 lib/cap_recipes/tasks/juggernaut/manage.rb
nesquena-cap-recipes-0.2.19 lib/cap_recipes/tasks/juggernaut/manage.rb
nesquena-cap-recipes-0.2.20 lib/cap_recipes/tasks/juggernaut/manage.rb
nesquena-cap-recipes-0.2.21 lib/cap_recipes/tasks/juggernaut/manage.rb
nesquena-cap-recipes-0.3.0 lib/cap_recipes/tasks/juggernaut/manage.rb
nesquena-cap-recipes-0.3.2 lib/cap_recipes/tasks/juggernaut/manage.rb
nesquena-cap-recipes-0.3.3 lib/cap_recipes/tasks/juggernaut/manage.rb
nesquena-cap-recipes-0.3.4 lib/cap_recipes/tasks/juggernaut/manage.rb
nesquena-cap-recipes-0.3.5 lib/cap_recipes/tasks/juggernaut/manage.rb
nesquena-cap-recipes-0.3.7 lib/cap_recipes/tasks/juggernaut/manage.rb