""" WSGI config for far_edge_ops_api project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ """ import os import sys from django.core.wsgi import get_wsgi_application from django.conf import settings BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(BASE_DIR) sys.path.append("%s../static/" % BASE_DIR) sys.path.append("%s/../../venv/lib/python3.6/site-packages" % BASE_DIR) os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'far_edge_ops_api.settings') if settings.DEBUG: application = get_wsgi_application() else: import time import traceback import signal try: application = get_wsgi_application() except Exception: if "mod_wsgi" in sys.modules: traceback.print_exc() os.kill(os.getpid(), signal.SIGINT) time.sleep(2.5)