mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-11-16 18:15:09 +00:00
48ca6eb4b0
When we were changing unit titles in the CMS, the changes were taking a long time to be reflected in the LMS. That's because the cache key that corresponds to the course structure was not being updated. It was the responsibility of an asynchronous LMS celery worker to update this cache entry. However, this was impossible in most cases because tasks triggered in the CMS were only processed by CMS workers. That is, unless we are using a custom celery router: https://celery.readthedocs.io/en/latest/userguide/routing.html#routers This is what edx-platform does in the devstack: certain CMS tasks are forwarded both to CMS and to LMS workers. This is achieved by defining the ALTERNATE_WORKER_QUEUES="lms" django setting in the CMS. Adding this setting to Tutor solves the problem in production. However, in development mode Open edX runs without workers (`CELERY_ALWAYS_EAGER=True`). This means that the course structure will not be automatically updated when running `tutor dev` commands, which is a shame. The alternative is to define the "block_structure.invalidate_cache_on_publish" waffle switch. This can be done from the UI (in /admin/waffle/switch/add/) or by running: tutor dev run lms ./manage.py lms waffle_switch block_structure.invalidate_cache_on_publish on --create However, this flag seems to slow down access to the LMS for the first user who tries to access the course after it has been updated. Close #302 |
||
---|---|---|
.. | ||
img | ||
plugins | ||
_release_description.md | ||
.gitignore | ||
cli_download.rst | ||
conf.py | ||
configuration.rst | ||
dev.rst | ||
extra.rst | ||
faq.rst | ||
gettingstarted.rst | ||
index.rst | ||
install.rst | ||
intro.rst | ||
k8s.rst | ||
local.rst | ||
Makefile | ||
plugins.rst | ||
podman.rst | ||
quickstart.rst | ||
run.rst | ||
testimonials.rst | ||
troubleshooting.rst | ||
tutor.rst | ||
whatnext.rst |