-
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
Added --active option for reindex_courses #34078
Added --active option for reindex_courses #34078
Conversation
326f37f
to
c577ac1
Compare
316c4ff
to
2dd9fe8
Compare
92abf7c
to
63a5e70
Compare
@@ -116,3 +124,13 @@ def test_given_all_key_prompts_and_reindexes_all_courses_cancelled(self): | |||
|
|||
patched_yes_no.assert_called_once_with(ReindexCommand.CONFIRMATION_PROMPT, default='no') | |||
patched_index.assert_not_called() | |||
|
|||
def test_given_active_key_prompt(self): | |||
""" Test that reindexes all courses when --active key is given """ |
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.
we should probably test that it indexes only some of the courses by making one of the courses inactive
although below it only sets up first course so is that what the test is doing and the comment is wrong?
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.
Yes, I forgot to update the test. It actually reindex only the courses that are active, this is, courses that have a starting date and no end date or the end date is in the future. I'll update the comment.
63a5e70
to
498df7c
Compare
498df7c
to
df29da8
Compare
df29da8
to
a6dd0fe
Compare
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
2U Release Notice: This PR has been deployed to the edX production environment. |
1 similar comment
2U Release Notice: This PR has been deployed to the edX production environment. |
Description
This adds a new parameter for the
reindex_courses
command that filters out non-active courses when selecting the course batch.Testing instructions
While on the edx-platform container shell, run:
To reindex all active courses. The output should look like:
Deadline
None