Skip to content

Commit

Permalink
fix: ref mgmt cmd logging (#33481)
Browse files Browse the repository at this point in the history
  • Loading branch information
rayzhou-bit authored Oct 12, 2023
1 parent b7286d7 commit 2033dcf
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ def add_arguments(self, parser):
def replace_all_library_source_blocks_ids(self, v1_to_v2_lib_map):
"""A method to replace 'source_library_id' in all relevant blocks."""

course_id_strings = CourseOverview.get_all_course_keys()
course_id_strings = list(CourseOverview.get_all_course_keys())

# Following is used for debugging and should be removed
for course_id_string in course_id_strings:
log.info(course_id_string)

# Use Celery to distribute the workload
tasks = group(
Expand All @@ -57,7 +61,7 @@ def replace_all_library_source_blocks_ids(self, v1_to_v2_lib_map):

def validate(self, v1_to_v2_lib_map):
""" Validate that replace_all_library_source_blocks_ids was successful"""
course_id_strings = CourseOverview.get_all_course_keys()
course_id_strings = list(CourseOverview.get_all_course_keys())
tasks = group(validate_all_library_source_blocks_ids_for_course.s(course_id, v1_to_v2_lib_map) for course_id in course_id_strings) # lint-amnesty, pylint: disable=line-too-long
results = tasks.apply_async()

Expand All @@ -79,7 +83,7 @@ def validate(self, v1_to_v2_lib_map):

def undo(self, v1_to_v2_lib_map):
""" undo the changes made by replace_all_library_source_blocks_ids"""
course_id_strings = CourseOverview.get_all_course_keys()
course_id_strings = list(CourseOverview.get_all_course_keys())

# Use Celery to distribute the workload
tasks = group(
Expand Down

0 comments on commit 2033dcf

Please sign in to comment.