blob: 7f9b679c549e31dbe5c4a7c25148c04f4bda1675 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
"""
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)
|