summaryrefslogtreecommitdiff
path: root/archweb.wsgi
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-01-13 19:56:58 -0600
committerDan McGee <dan@archlinux.org>2013-01-13 19:56:58 -0600
commit8986be44be8ed8778e30fc144a2bc76febc11c6d (patch)
tree9feb0f459c7d95008c8e6d8ad7fb9130745e3fd9 /archweb.wsgi
parentd9735f24ec5c44d032141cb4912523fa8c9dd51a (diff)
More tweaks for New Relic in WSGI script
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'archweb.wsgi')
-rw-r--r--archweb.wsgi7
1 files changed, 6 insertions, 1 deletions
diff --git a/archweb.wsgi b/archweb.wsgi
index 6fac21e9..0d1798ab 100644
--- a/archweb.wsgi
+++ b/archweb.wsgi
@@ -28,4 +28,9 @@ import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
if using_newrelic:
- application = application = newrelic.agent.wsgi_application()(application)
+ _application = application
+ def application(environ, start_response):
+ os.environ["NEW_RELIC_LICENSE_KEY"] = environ.get("NEW_RELIC_LICENSE_KEY", None)
+ return _application(environ, start_response)
+
+ application = newrelic.agent.wsgi_application()(application)