6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2025-02-11 21:58:39 +00:00
Régis Behmo 48ca6eb4b0 Fix updates to the course structure in the LMS
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
2020-04-14 19:16:52 +02:00
..
2019-10-25 10:53:59 +02:00
2020-04-04 18:22:15 +02:00
2018-12-26 19:27:08 +01:00
2020-02-25 17:03:11 +01:00
2020-03-16 22:33:56 +01:00
2020-03-16 22:27:04 +01:00
2020-03-16 12:07:58 +01:00
2020-03-16 12:07:58 +01:00
2020-03-27 09:49:08 +01:00
2020-03-16 12:07:58 +01:00
2020-03-16 22:14:36 +01:00
2020-04-06 09:56:04 +02:00
2020-03-16 22:14:36 +01:00
2020-03-16 12:07:58 +01:00
2020-01-10 19:03:53 +01:00
2020-03-16 22:27:04 +01:00
2020-03-16 12:07:58 +01:00
2020-03-16 12:07:58 +01:00
2020-03-16 12:07:58 +01:00