graphite.wsgi 782 B

1234567891011121314151617181920212223242526
  1. import os
  2. import sys
  3. sys.path.append('/var/lib/graphite/webapp')
  4. try:
  5. from importlib import import_module
  6. except ImportError:
  7. from django.utils.importlib import import_module
  8. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'graphite.settings') # noqa
  9. from django.conf import settings
  10. from django.core.wsgi import get_wsgi_application
  11. from graphite.logger import log
  12. application = get_wsgi_application()
  13. # Aufgrund von Problemen mit der Whitenoise 2.0.6 wurde die Whitenoise
  14. # Einbindung entfernt
  15. # Initializing the search index can be very expensive. The import below
  16. # ensures the index is preloaded before any requests are handed to the
  17. # process.
  18. log.info("graphite.wsgi - pid %d - reloading search index" % os.getpid())
  19. import graphite.metrics.search # noqa