diff options
author | rhenium <rhenium@rhe.jp> | 2014-07-02 07:07:32 +0900 |
---|---|---|
committer | rhenium <rhenium@rhe.jp> | 2014-07-02 07:07:32 +0900 |
commit | da7bdccea5177776a226cf82780f320919d4044a (patch) | |
tree | 0a3bb0b170240fb7f8caec07d2b5b6b1c4db1ab6 /lib | |
parent | 521fd5e6597c8c71ebf4e3e9bb277480c6e23f76 (diff) | |
download | aclog-da7bdccea5177776a226cf82780f320919d4044a.tar.gz |
add rake task: web:run (run unicorn in foreground)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/web.rake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/tasks/web.rake b/lib/tasks/web.rake index 78db4f2..302e57c 100644 --- a/lib/tasks/web.rake +++ b/lib/tasks/web.rake @@ -9,6 +9,11 @@ namespace :web do Process.kill(0, pid) rescue false end + desc "Start aclog collector (master) in the foreground" + task :run do + system "unicorn -E #{Rails.env} -c #{Rails.root}/config/unicorn.rb" + end + desc "Start web server (Unicorn)" task :start do pid = web_read_pid @@ -16,7 +21,7 @@ namespace :web do STDERR.puts "Unicorn is already started (PID: #{pid})" next end - puts `unicorn -D -E #{Rails.env} -c #{Rails.root}/config/unicorn.rb` + system "unicorn -D -E #{Rails.env} -c #{Rails.root}/config/unicorn.rb" end desc "Stop web server (Unicorn)" |