This repository has been archived by the owner on Oct 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from obfuscurity/feature/graphite-master
WIP Graphite 1.0
- Loading branch information
Showing
8 changed files
with
806 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,4 @@ | ||
import os, sys | ||
import sys | ||
sys.path.append('/opt/graphite/webapp') | ||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'graphite.settings') | ||
|
||
import django | ||
|
||
if django.VERSION < (1, 4): | ||
from django.core.handlers.wsgi import WSGIHandler | ||
application = WSGIHandler() | ||
else: | ||
# From 1.4 wsgi support was improved and since 1.7 old style WSGI script | ||
# causes AppRegistryNotReady exception | ||
# https://docs.djangoproject.com/en/dev/releases/1.7/#wsgi-scripts | ||
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 WSGIImportScript 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 | ||
from graphite.wsgi import application |
Oops, something went wrong.