Commit e4ca4dcb0c042c5119d065f1439f1fe87dd37848

Authored by Rohan Rangray
1 parent 5c344b8a0b
Exists in master

Integrated newrelic into the module to allow for touch reloads

Showing 2 changed files with 3 additions and 1 deletions Side-by-side Diff

flashy/wsgi_django.py View file @ e4ca4dc
1 1 import os
  2 +import newrelic.agent
  3 +newrelic.agent.initialize('/some/path/newrelic.ini')
2 4 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "flashy.settings")
3 5 from django.core.wsgi import get_wsgi_application
4 6 application = get_wsgi_application()
scripts/run_production.sh View file @ e4ca4dc
... ... @@ -4,5 +4,5 @@
4 4 # 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
5 5 # Run the scripts with 'exec' so they're tracked by upstart properly
6 6 exec uwsgi /etc/uwsgi/websocket.ini --touch-reload=/etc/uwsgi/websocket.ini &
7   -exec newrelic-admin run-program uwsgi /etc/uwsgi/flashy.ini --touch-reload=/etc/uwsgi/flashy.ini
  7 +exec uwsgi /etc/uwsgi/flashy.ini --touch-reload=/etc/uwsgi/flashy.ini