From ee1b73b9c8a297c40032e50e5921f3d2cbe1ba17 Mon Sep 17 00:00:00 2001 From: Matheus Veleci Date: Thu, 20 Apr 2017 11:30:40 -0300 Subject: [PATCH] =?UTF-8?q?Ajusta=20busy-wait=20para=20verificar=20a=20DAT?= =?UTF-8?q?ABASE=5FURL=20gen=C3=A9rica(Vari=C3=A1vel=20de=20Ambiente)=20e?= =?UTF-8?q?=20altera=20n=C3=BAmero=20de=20cores=20do=20gunicorn=5Fstart.sh?= =?UTF-8?q?=20para=209?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- busy-wait.sh | 2 +- gunicorn_start.sh | 2 +- start.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/busy-wait.sh b/busy-wait.sh index 128592ffc..73fde5c6b 100644 --- a/busy-wait.sh +++ b/busy-wait.sh @@ -1,7 +1,7 @@ #!/bin/sh while true; do - COUNT_PG=`psql --dbname=postgresql://sapl:sapl@sapldb/sapl -c '\l \q' | grep sapl | wc -l` + COUNT_PG=`psql $1 -c '\l \q' | grep sapl | wc -l` if ! [ "$COUNT_PG" -eq "0" ]; then break fi diff --git a/gunicorn_start.sh b/gunicorn_start.sh index 5d82418df..79666cf19 100755 --- a/gunicorn_start.sh +++ b/gunicorn_start.sh @@ -16,7 +16,7 @@ DJANGODIR=/var/interlegis/sapl/ # Django project directory (* SOCKFILE=/var/interlegis/sapl/run/gunicorn.sock # we will communicate using this unix socket (*) USER=`whoami` # the user to run as (*) GROUP=`whoami` # the group to run as (*) -NUM_WORKERS=3 # how many worker processes should Gunicorn spawn (*) +NUM_WORKERS=9 # how many worker processes should Gunicorn spawn (*) # NUM_WORKERS = 2 * CPUS + 1 DJANGO_SETTINGS_MODULE=sapl.settings # which settings file should Django use (*) DJANGO_WSGI_MODULE=sapl.wsgi # WSGI module name (*) diff --git a/start.sh b/start.sh index f421efa99..893296a89 100755 --- a/start.sh +++ b/start.sh @@ -44,7 +44,7 @@ create_env python3 manage.py bower install -/bin/sh busy-wait.sh +/bin/sh busy-wait.sh $DATABASE_URL python3 manage.py migrate python3 manage.py collectstatic --no-input