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

refactor: add lazy field to LibraryCollectionData #404

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ __________



[9.15.0] - 2024-10-10
---------------------

Changed
~~~~~~~

* Added ``lazy`` field to ``LibraryCollectionData`` so that senders can specify if handlers can run asynchrounously.

[9.14.1] - 2024-09-17
---------------------

Expand Down
2 changes: 1 addition & 1 deletion openedx_events/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
more information about the project.
"""

__version__ = "9.14.1"
__version__ = "9.15.0"
3 changes: 3 additions & 0 deletions openedx_events/content_authoring/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ class LibraryCollectionData:
Arguments:
library_key (LibraryLocatorV2): a key that represents a Blockstore-based content library.
collection_key (str): identifies the collection within the library's learning package
lazy (bool): indicate whether the sender doesn't want to wait for handler to finish execution,
i.e., the handler can run the task in background. By default it is False.
"""

library_key = attr.ib(type=LibraryLocatorV2)
collection_key = attr.ib(type=str)
lazy = attr.ib(type=bool, default=False)
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
{
"name": "collection_key",
"type": "string"
},
{
"name": "lazy",
"type": "boolean"
}
]
}
}
],
"namespace": "org.openedx.content_authoring.content_library.collection.created.v1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
{
"name": "collection_key",
"type": "string"
},
{
"name": "lazy",
"type": "boolean"
}
]
}
}
],
"namespace": "org.openedx.content_authoring.content_library.collection.deleted.v1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
{
"name": "collection_key",
"type": "string"
},
{
"name": "lazy",
"type": "boolean"
}
]
}
}
],
"namespace": "org.openedx.content_authoring.content_library.collection.updated.v1"
}
}