From e4ca4dcb0c042c5119d065f1439f1fe87dd37848 Mon Sep 17 00:00:00 2001 From: Rohan Rangray Date: Fri, 22 May 2015 23:25:30 -0700 Subject: [PATCH] Integrated newrelic into the module to allow for touch reloads --- flashy/wsgi_django.py | 2 ++ scripts/run_production.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/flashy/wsgi_django.py b/flashy/wsgi_django.py index a1d7655..5c8bc91 100644 --- a/flashy/wsgi_django.py +++ b/flashy/wsgi_django.py @@ -1,4 +1,6 @@ import os +import newrelic.agent +newrelic.agent.initialize('/some/path/newrelic.ini') os.environ.setdefault("DJANGO_SETTINGS_MODULE", "flashy.settings") from django.core.wsgi import get_wsgi_application application = get_wsgi_application() diff --git a/scripts/run_production.sh b/scripts/run_production.sh index 998b3c3..6abf2aa 100755 --- a/scripts/run_production.sh +++ b/scripts/run_production.sh @@ -4,4 +4,4 @@ source venv/bin/activate # newrelic-admin run-program /srv/flashy-backend/venv/bin/gunicorn --pid /run/flashy/gunicorn.pid -w 6 -n flashy -b 127.0.0.1:7002 flashy.wsgi # Run the scripts with 'exec' so they're tracked by upstart properly exec uwsgi /etc/uwsgi/websocket.ini --touch-reload=/etc/uwsgi/websocket.ini & -exec newrelic-admin run-program uwsgi /etc/uwsgi/flashy.ini --touch-reload=/etc/uwsgi/flashy.ini +exec uwsgi /etc/uwsgi/flashy.ini --touch-reload=/etc/uwsgi/flashy.ini -- 1.9.1