Sha256: f05e3f2b830f1d8218a891fceeeda42c837c51f8fb6e034177c4127398550594
Contents?: true
Size: 660 Bytes
Versions: 1
Compression:
Stored size: 660 Bytes
Contents
if File.exists? Rails.root.join('unicorn.rb') namespace :unicorn do desc 'Start unicorn server' task :start do if File.exists? Rails.root.join('config.ru') cmd = 'unicorn' else cmd = 'unicorn_rails' end zfben_rails_rake_system cmd << ' -c unicorn.rb -E production -D' 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 end zfben_rails_rake_system 'rm -r tmp/*' end desc 'Restart unicorn server' task :restart => [:stop, :start] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
zfben_rails_rake-0.0.19 | lib/zfben_rails_rake/tasks/unicorn.rb |