feat: make course -> lib import synchronous (#34030)
* feat: make course -> lib import synchronous --------- Co-authored-by: Kyle McCormick <kyle@axim.org>
This commit is contained in:
@@ -128,10 +128,16 @@ class LibraryToolsService:
|
||||
if library_version:
|
||||
raise ObjectDoesNotExist(f"Version {library_version} of library {library_key} not found.")
|
||||
raise ObjectDoesNotExist(f"Library {library_key} not found.")
|
||||
library_tasks.sync_from_library.delay(
|
||||
user_id=self.user_id,
|
||||
dest_block_id=str(dest_block.scope_ids.usage_id),
|
||||
library_version=library_version,
|
||||
|
||||
# TODO: This task is synchronous until we can figure out race conditions with import.
|
||||
# These race conditions lead to failed imports of library content from course import.
|
||||
# See: TNL-11339, https://github.com/openedx/edx-platform/issues/34029 for more info.
|
||||
library_tasks.sync_from_library.apply(
|
||||
kwargs=dict(
|
||||
user_id=self.user_id,
|
||||
dest_block_id=str(dest_block.scope_ids.usage_id),
|
||||
library_version=library_version,
|
||||
),
|
||||
)
|
||||
|
||||
def trigger_duplication(self, source_block: LibraryContentBlock, dest_block: LibraryContentBlock) -> None:
|
||||
|
||||
Reference in New Issue
Block a user