Skip to content

Allow settings getters to await their responses - #36

Open
strohganoff wants to merge 2 commits into
refactor/event-stream-processingfrom
feature/await-settings-responses
Open

strohganoff wants to merge 2 commits into
refactor/event-stream-processingfrom
feature/await-settings-responses

Conversation

@strohganoff

Copy link
Copy Markdown
Owner

Add optional response waits to get_settings() and get_global_settings(). Both methods still send and return None by default. With wait_for_response=True, the broker matches the response by request ID and checks the event type and action context where applicable.

The router resolves the waiter before queueing the same event for ordinary dispatch. A handler can await its response while the sequential dispatcher is paused. This also covers Python 3.10 timeout handling and ignores non-string IDs during correlation. Rejecting new waits once routing ends is tracked as follow-up work.

Validation: 207 tests passed locally on Python 3.10 and 3.11.

Stacked on #35.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant