-
Notifications
You must be signed in to change notification settings - Fork 35
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
[SDESK-7442] Migrate Events resource service to async #2150
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SDESK-7442
Along with another set of utils functions SDESK-7442
SDESK-7442
SDESK-7442
MarkLark86
reviewed
Dec 9, 2024
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.
Looks good, just a couple small suggestions
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.
LGTM!
SDESK-7442
BrianMwangi21
approved these changes
Dec 10, 2024
I will fix the test in a subsequent PR. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Extend the new Event async resource service with the next methods
on_create
create
on_created
validate_event
and related private methodson_update
update
on_updated
on_deleted
What has changed
sync
service to new async one and the corresponding code has been adjusted as much as possible to be async (along with the depending internal/private methods)events_utils
module in order to make some of the functions reusableWhat's pending
get_resource_service("events")
. There was not enough time to do so, although some tests were already adjusted and fixed.prod_api
on superdesk-core (AttributeError: __enter__
) produced herehttps://github.com/superdesk/superdesk-core/blob/88d2543a841896731725cb5f2e5cd2b7b34d2a6a/prod_api/conftest.py#L53-L55
(most likely because
prodapi_app.app_context()
is not awaited)Note
I will go through the docstrings of these changes and update them. If there is not time before sprint end, I will provide another small PR for that.
Thanks for reviewing!
Resolves: SDESK-7442