-
Notifications
You must be signed in to change notification settings - Fork 5
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!: Switch to a single Producer, wrapped in an API singleton #32
Merged
Commits on Aug 26, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 214e360 - Browse repository at this point
Copy the full SHA 214e360View commit details -
Configuration menu - View commit details
-
Copy full SHA for a9c6ac7 - Browse repository at this point
Copy the full SHA a9c6ac7View commit details -
feat!: Switch to a single Producer, wrapped in an API singleton
Purpose: - Revisit #16 since I finally figured out a clean way to have a single producer. - Reduce the burden on future code that will need to adjust how polling is done (#31) and maybe handle shutdown (#11) - Prepare for configurable implementation loading, which will need a singleton and getter: openedx/openedx-events#87 - Get rid of the `sync` argument (which didn't fit the abstraction) and move it to a dedicated method. Relying code should now call `get_producer().send(...)` rather than `send_to_event_bus(...)`. The return value is an object that wraps a `Producer` instance (not a `SerializingProducer`) and that handles the serialization itself. Serialization logic is moved to a cached `get_serializers(...)` that expands upon the previous `get_serializer` function; it now returns a pair of key and value serializers. This also acts as a patch point for mocking. I'd like to test the serializers themselves, but they want to talk to a server. `send_to_event_bus` gets a shorter name (now it's just a `send` method) and loses the `sync` keyword argument; there is instead now a `pre_shutdown` method.
Configuration menu - View commit details
-
Copy full SHA for a4b9e52 - Browse repository at this point
Copy the full SHA a4b9e52View commit details
Commits on Aug 29, 2022
-
- Fix comment re: client caching - Use `cache` instead of `lru_cache` (should only ever have one value anyhow)
Configuration menu - View commit details
-
Copy full SHA for c5fe89a - Browse repository at this point
Copy the full SHA c5fe89aView commit details -
fixup! Restore use of lru_cache
functools.cache is new in Python 3.9. :-)
Configuration menu - View commit details
-
Copy full SHA for 1278f99 - Browse repository at this point
Copy the full SHA 1278f99View commit details
Commits on Aug 31, 2022
-
fixup! Rename
pre_shutdown
->prepare_for_shutdown
Also update CHANGELOG date prediction.
Configuration menu - View commit details
-
Copy full SHA for 2e09d6d - Browse repository at this point
Copy the full SHA 2e09d6dView commit details -
Configuration menu - View commit details
-
Copy full SHA for de012d5 - Browse repository at this point
Copy the full SHA de012d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e63553 - Browse repository at this point
Copy the full SHA 3e63553View commit details -
Configuration menu - View commit details
-
Copy full SHA for 46f3c91 - Browse repository at this point
Copy the full SHA 46f3c91View commit details
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.