Skip to content
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

feat: set collections for a library component [FC-0062] #35600

Merged
merged 38 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
bf17dbb
feat: add & remove collections to component
navinkarkera Oct 3, 2024
e5d3b69
refactor: set collections in a component
navinkarkera Oct 4, 2024
40a63e4
refactor: async collections indexing
navinkarkera Oct 4, 2024
d18d5ba
fix: lint issues
navinkarkera Oct 4, 2024
ac59d53
test: test set collections for component
navinkarkera Oct 7, 2024
fa8ad9e
chore: fix docs
navinkarkera Oct 7, 2024
0b7a782
chore: temporarily update openedx-learning package
navinkarkera Oct 7, 2024
e007398
fix: lint issues
navinkarkera Oct 7, 2024
0a438d0
chore: add usage_key to filterable attribute
navinkarkera Oct 8, 2024
4c8ab8a
feat: add collections to component api
navinkarkera Oct 9, 2024
86b8cdd
fix: lint issues
navinkarkera Oct 9, 2024
cd9eec9
fix: remove collection-entity through model post_delete signal handler
navinkarkera Oct 10, 2024
97ad3ba
fix: use lazy field to control collection update task
navinkarkera Oct 10, 2024
baa10fc
chore: temporarily point openedx-events to dev branch
navinkarkera Oct 10, 2024
e553ec0
fix: use get_components in m2m_changed signal handler
navinkarkera Oct 10, 2024
758334f
fix: circuvent meilisearch bug
rpenido Oct 10, 2024
39e825e
feat: add & remove collections to component
navinkarkera Oct 3, 2024
22d9bce
refactor: set collections in a component
navinkarkera Oct 4, 2024
d0c304c
refactor: async collections indexing
navinkarkera Oct 4, 2024
5d31959
fix: lint issues
navinkarkera Oct 4, 2024
acfb0fc
test: test set collections for component
navinkarkera Oct 7, 2024
ae1c7c5
chore: fix docs
navinkarkera Oct 7, 2024
f38ca21
chore: temporarily update openedx-learning package
navinkarkera Oct 7, 2024
68206c2
fix: lint issues
navinkarkera Oct 7, 2024
cedbea7
chore: add usage_key to filterable attribute
navinkarkera Oct 8, 2024
8fef447
feat: add collections to component api
navinkarkera Oct 9, 2024
5dd1a91
fix: lint issues
navinkarkera Oct 9, 2024
dac0f1e
fix: remove collection-entity through model post_delete signal handler
navinkarkera Oct 10, 2024
a0f439f
fix: use lazy field to control collection update task
navinkarkera Oct 10, 2024
b41edf8
chore: temporarily point openedx-events to dev branch
navinkarkera Oct 10, 2024
4248639
Merge branch 'navin/component-collection-api' into rpenido/navin/comp…
navinkarkera Oct 11, 2024
c4ce75f
fix: use get_components in m2m_changed signal handler
navinkarkera Oct 10, 2024
557b176
Merge pull request #695 from open-craft/rpenido/navin/component-colle…
navinkarkera Oct 11, 2024
ddb343d
fix: update components if collection was deleted
navinkarkera Oct 11, 2024
9d2bfe3
refactor: rename lazy field to background
navinkarkera Oct 11, 2024
6d4cb36
chore: update openedx-events version
navinkarkera Oct 12, 2024
9bea9e8
chore: update openedx-learning version
navinkarkera Oct 15, 2024
e8f5bfb
Merge branch 'master' into navin/component-collection-api
ChrisChV Oct 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: rename lazy field to background
  • Loading branch information
navinkarkera committed Oct 15, 2024
commit 9d2bfe35c24a58f4480c08c33c8b5b617574ea04
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/content/search/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def library_collection_updated_handler(**kwargs) -> None:
log.error("Received null or incorrect data for event")
return

if library_collection.lazy:
if library_collection.background:
update_library_collection_index_doc.delay(
str(library_collection.library_key),
library_collection.collection_key,
Expand Down
4 changes: 2 additions & 2 deletions openedx/core/djangoapps/content_libraries/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1296,14 +1296,14 @@ def set_library_component_collections(
created_by=created_by,
)

# For each collection, trigger LIBRARY_COLLECTION_UPDATED signal and set lazy=True to trigger
# For each collection, trigger LIBRARY_COLLECTION_UPDATED signal and set background=True to trigger
# collection indexing asynchronously.
for collection in affected_collections:
LIBRARY_COLLECTION_UPDATED.send_event(
library_collection=LibraryCollectionData(
library_key=library_key,
collection_key=collection.key,
lazy=True,
background=True,
)
)

Expand Down
4 changes: 2 additions & 2 deletions openedx/core/djangoapps/content_libraries/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ def test_set_library_component_collections(self):
"library_collection": LibraryCollectionData(
self.lib2.library_key,
collection_key=self.col2.key,
lazy=True,
background=True,
),
},
collection_update_event_receiver.call_args_list[0].kwargs,
Expand All @@ -556,7 +556,7 @@ def test_set_library_component_collections(self):
"library_collection": LibraryCollectionData(
self.lib2.library_key,
collection_key=self.col3.key,
lazy=True,
background=True,
),
},
collection_update_event_receiver.call_args_list[1].kwargs,
Expand Down