Sha256: 949917e1b45a42ec2971fa7c000b1d296c0672ecbe3d48eb89ef12d8ef9b59f9
Contents?: true
Size: 954 Bytes
Versions: 16
Compression:
Stored size: 954 Bytes
Contents
if File.exists? Rails.root.join('unicorn.rb') namespace :unicorn do desc 'Start unicorn server' task :start => :stop do if File.exists? Rails.root.join('config.ru') cmd = 'unicorn' else cmd = 'unicorn_rails' end cmd << ' -c unicorn.rb -E production -D' zfben_rails_rake_system 'mkdir tmp' unless File.exists? Rails.root.join('tmp') zfben_rails_rake_system cmd end desc 'Stop unicorn server' task :stop do if File.exists? Rails.root.join('tmp/unicorn.pid') zfben_rails_rake_system 'kill -QUIT `cat tmp/unicorn.pid`' sleep 1 zfben_rails_rake_system 'rm tmp/unicorn.pid' if File.exists? Rails.root.join('tmp/unicorn.pid') end end desc 'Hot restart unicorn server' task :restart do if File.exists? Rails.root.join('tmp/unicorn.pid') zfben_rails_rake_system 'kill -USR2 `cat tmp/unicorn.pid`' end end end end
Version data entries
16 entries across 16 versions & 2 rubygems