Commit 7c758ec9 by Calen Pennington

Don't force modulestore initialization when running lms manage.py, only when…

Don't force modulestore initialization when running lms manage.py, only when running via the wsgi file
parent 7110500e
......@@ -8,21 +8,15 @@ from django.conf import settings
settings.INSTALLED_APPS # pylint: disable=W0104
from django_startup import autostartup
from xmodule.modulestore.django import modulestore
import edxmako
def run():
"""
Executed during django startup
"""
autostartup()
# Trigger a forced initialization of our modulestores since this can take a
# while to complete and we want this done before HTTP requests are accepted.
if settings.INIT_MODULESTORE_ON_STARTUP:
for store_name in settings.MODULESTORE:
modulestore(store_name)
if settings.FEATURES.get('USE_CUSTOM_THEME', False):
enable_theme()
......
......@@ -5,6 +5,16 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lms.envs.aws")
import lms.startup as startup
startup.run()
from django.conf import settings
from xmodule.modulestore.django import modulestore
# Trigger a forced initialization of our modulestores since this can take a
# while to complete and we want this done before HTTP requests are accepted.
if settings.INIT_MODULESTORE_ON_STARTUP:
for store_name in settings.MODULESTORE:
modulestore(store_name)
# This application object is used by the development server
# as well as any WSGI server configured to use this file.
from django.core.wsgi import get_wsgi_application
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment