Skip to content

Commit

Permalink
fix: Force djangoapps to be loaded before we run webpack.
Browse files Browse the repository at this point in the history
In the specific case of webworkers for proctoring, we need to
force Django to load before we run `npm run webpack` so that
the file ../workers.json gets written. See
https://github.com/openedx/edx-proctoring/blob/73c7f55e2be91324fa07fec6e6ac0a667fdd8412/edx_proctoring/apps.py#L46
  • Loading branch information
dianakhuang committed Dec 17, 2024
1 parent e8e4a68 commit b59eca8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ export STATIC_ROOT_CMS=/edx/var/edxapp/staticfiles/studio
export STATICFILES_STORAGE={{ override | quote }}
sudo -E -H -u {{ edxapp_user }} \
env "PATH=$PATH" \
npm run webpack \
{{ edxapp_venv_bin }} python manage.py lms --settings=$EDX_PLATFORM_SETTINGS print_setting STATIC_ROOT \
&& npm run webpack \
&& npm run compile-sass -- --theme-dir /edx/var/edx-themes/edx-themes/edx-platform --theme-dir /edx/app/edxapp/edx-platform/themes \
&& {{ edxapp_venv_bin }}/python manage.py lms collectstatic --noinput --settings=$EDX_PLATFORM_SETTINGS \
&& {{ edxapp_venv_bin }}/python manage.py cms collectstatic --noinput --settings=$EDX_PLATFORM_SETTINGS
{% endfor %}
{% else %}
sudo -E -H -u {{ edxapp_user }} \
env "PATH=$PATH" \
npm run webpack \
{{ edxapp_venv_bin }} python manage.py lms --settings=$EDX_PLATFORM_SETTINGS print_setting STATIC_ROOT \
&& npm run webpack \
&& npm run compile-sass -- --theme-dir /edx/var/edx-themes/edx-themes/edx-platform --theme-dir /edx/app/edxapp/edx-platform/themes \
&& {{ edxapp_venv_bin }}/python manage.py lms collectstatic --noinput --settings=$EDX_PLATFORM_SETTINGS \
&& {{ edxapp_venv_bin }}/python manage.py cms collectstatic --noinput --settings=$EDX_PLATFORM_SETTINGS
Expand Down

0 comments on commit b59eca8

Please sign in to comment.