-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance enhancements for django-admin commands to delete and clone course #570
Performance enhancements for django-admin commands to delete and clone course #570
Conversation
…speed up the whole thing as well as squelching warnings in the console output
|
||
if clone_course(mstore, cstore, source_location, dest_location): | ||
# be sure to recompute metadata inheritance after all those updates | ||
mstore.refresh_cached_metadata_inheritance_tree(dest_location) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't look at the file, just the diff; so, it may be obvious in context. (e.g., if there's no way to avoid the inheritance calc and doing it proactively squelches recomputes)
Since you're cloning and don't want to store inherited values in the clone but leave them "unset", why are you forcing metadata inheritance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wanted to "warm the cache" after all these bulk updates happen. We do the same thing after import - suppress recomputation on the fly, because it isn't performant - and then do a single recompute at the end.
Does this have existing unit tests which pass? If so, and if the clone does not set values which the source does not set, then 👍 |
@dmitchell re: tests. See test_clone_course() in test_contentstore.py |
…elete-course Performance enhancements for django-admin commands to delete and clone course
updated admin_dashboard to show count of unique students
Merge pull request #570 from edx-solutions/rc/2015-11-19
…block-sha Adding EdxAdapt xblock to platform
Li/ednx/fd 4
These redirects are already in place for the courseware, and will redirect to the outline page, or the dashboard, or wherever, based on the type of access error (unenrolled, access expired, survey needed, etc). This commit stops the course home tabs from paying attention to the 401 error messages coming from the backend - course_access in the metadata API handles that now. This commit also changes our useModel hook to more gracefully handle not being able to find the model - it is a valid case we want to allow (still will cause problems if you actually try to use the data, but will at least provide an object you can inspect).
NOTES: This is done to vastly speed up deleting and cloning courses which are django-admins I run often regarding courseware manipulations. The problem was that there was no metadata cache being setup so there was alot of DB thrashing happening. Also we need to add the course_id to a special list of courses which are known to have a lot of grouped write transactions on it, so that final metadata computation is done at the end (for clone_course in this case).
@cahrens @dmitchell can you review?