Commit ffd116669dc97ff53fa41f60bbee08d7818a184d

Authored by Victor Costa
1 parent b88e849e

Fix production script

Showing 1 changed file with 4 additions and 2 deletions   Show diff stats
script/production
... ... @@ -55,7 +55,7 @@ do_restart() {
55 55 environments_loop start
56 56  
57 57 clear_cache
58   - ruby -S bundle exec thin -C config/thin.yml restart --onebyone
  58 + RUBY_GC_MALLOC_LIMIT=250000000 RUBY_HEAP_MIN_SLOTS=800000 RUBY_FREE_MIN=32768 ruby -S bundle exec thin -C config/thin.yml restart --onebyone
59 59 }
60 60  
61 61 stop_via_pid_file() {
... ... @@ -85,7 +85,9 @@ environments_loop() {
85 85 }
86 86  
87 87 do_running() {
88   - pgrep -u noosfero -f 'thin server' > /dev/null
  88 + pids=$(sed "s/.*/& /" tmp/pids/thin.*.pid | tr -d '\n' 2>/dev/null || true)
  89 + # passes if any of $pids exist, fails otherwise
  90 + kill -0 $pids > /dev/null 2>&1
89 91 }
90 92  
91 93 case "$ACTION" in
... ...