Module: UnicornRails

Defined in:
lib/magicmonkey/app_servers/unicorn_rails.rb

Class Method Summary collapse

Class Method Details

.start(args = {}) ⇒ Object



3
4
5
# File 'lib/magicmonkey/app_servers/unicorn_rails.rb', line 3

def self.start(args = {})
  ["unicorn_rails -E production -p #{args[:port]} #{args[:app_server_options]} -D"]
end

.stop(args = {}) ⇒ Object



7
8
9
# File 'lib/magicmonkey/app_servers/unicorn_rails.rb', line 7

def self.stop(args = {})
  ["kill `ps ax | grep -v grep | grep -e 'unicorn_rails .*-p #{args[:port]}' | awk 'NR==1{print $1}'` || true"]
end