system-config/modules/graphite/templates/graphite.wsgi.erb
James E. Blair 3cab5e4d84 Add graphite.
Change-Id: I276641d55e966cd76013cae847061c3ac7996864
Reviewed-on: https://review.openstack.org/17094
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2012-12-02 20:28:38 +00:00

17 lines
589 B
Plaintext

import os, sys
sys.path.append('/var/lib/graphite/webapp')
os.environ['DJANGO_SETTINGS_MODULE'] = 'graphite.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
# 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