puppet-graphite/templates/graphite.wsgi.django17.erb
Ian Wienand 78494074a8 Fix django wsgi typo
Introduced with Ia741af25391603fe81c0185b586b5841910f714a

Change-Id: I2c0f1e37edcb806556c6f50998e95abdece6f999
2019-03-01 12:33:55 +11:00

16 lines
588 B
Plaintext

import os, sys
sys.path.append('/var/lib/graphite/webapp')
os.environ['DJANGO_SETTINGS_MODULE'] = 'graphite.settings'
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
# READ THIS
# Initializing the search index can be very expensive, please include
# the WSGIScriptImport directive pointing to this script in your vhost
# config to ensure the index is preloaded before any requests are handed
# to the process.
from graphite.logger import log
log.info("graphite.wsgi - pid %d - reloading search index" % os.getpid())
import graphite.metrics.search