-
Notifications
You must be signed in to change notification settings - Fork 3
backpopulate files by resource id #2174
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
Conversation
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.
Not sure exactly whats happening buy when i try running python manage.py backpopulate_mitxonline_files --overwrite --learning_resource_id 8077
it does not appear to be updating the content after I changed it. i also tried deleting the contentfile object altogether to see if it would come back but it didnt. the celery task did seem to only process one item though just looking at the runtime
@@ -28,11 +28,20 @@ def add_arguments(self, parser): | |||
help="Overwrite any existing records", | |||
) | |||
|
|||
parser.add_argument( | |||
"--learning_resource_id", | |||
dest="learning_resource_id", |
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.
it might be good to have this parameter accept a list of comma separated ids like we do with embeddings and summary generation commands. something like --resource-ids 1,234,422
OpenAPI ChangesShow/hide 18 changes: 12 error, 0 warning, 6 info
|
2 similar comments
OpenAPI ChangesShow/hide 18 changes: 12 error, 0 warning, 6 info
|
OpenAPI ChangesShow/hide 18 changes: 12 error, 0 warning, 6 info
|
150134e
to
76b063f
Compare
OpenAPI ChangesShow/hide No detectable change.
|
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.
👍
76b063f
to
3a52ed8
Compare
OpenAPI ChangesShow/hide No detectable change.
|
What are the relevant tickets?
closes https://github.com/mitodl/hq/issues/7021
Description (What does it do?)
This pr updates the backpopulate files management commands for edx platforms to accept learning_resource_id to make it possible to update content files for a single learning resource
How can this be tested?
Go to http://api.open.odl.local:8063/api/v1/learning_resources/ and find an course on one of the edx platforms
Go to
http://api.open.odl.local:8063/api/v1/contentfiles/?resource_id= to check if the learning resource has content files
if you find some content files you can run
run
The job should finish relatively quickly
Go back to
http://api.open.odl.local:8063/api/v1/contentfiles/?resource_id= and verify that the content files exist and have the correct content
Run a file backpopulate command without the
learning_resource
flag and verify that it works normally. You can kill the job prematurely since it can take a while if you haven't already backpopulated the content files for that platform or if you use the --overwrite flag