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: allow flexible AIHordeAPIAsyncClientSession context #24

Merged
merged 5 commits into from
Sep 17, 2023
Merged

Conversation

tazlin
Copy link
Member

@tazlin tazlin commented Sep 17, 2023

On instantiating a AIHordeAPIAsyncSimpleClient, you now have the option of passing a AIHordeAPIAsyncClientSession. It is the responsibility of the caller to have used it with a with statement to still enable the automatically request cleanup on an exception.

This allows more flexibility in the design of loops which make these sort of calls, such as for the worker, while still having the benefits of it's context management.

@tazlin tazlin merged commit e28bd71 into main Sep 17, 2023
3 checks passed
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