File: graphite.wsgi

package info (click to toggle)
graphite-web 0.9.12%2Bdebian-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 13,464 kB
  • ctags: 3,343
  • sloc: python: 6,713; sh: 79; makefile: 44
file content (18 lines) | stat: -rw-r--r-- 609 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import os, sys
import django
os.environ['DJANGO_SETTINGS_MODULE'] = 'graphite.settings'
if django.get_version() >= "1.7":
	django.setup()

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