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

Explicitly close AsyncClient to avoid getting asyncio event loop is closed issues #101

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

vutrung96
Copy link
Contributor

We're getting these errors

future: <Task finished name='Task-46' coro=<AsyncClient.aclose() done, defined at /home/trung/.cache/pypoetry/virtualenvs/bespokelabs-curator-H3Ru9elj-py3.11/lib/python3.11/site-packages/httpx/_client.py:2024> exception=RuntimeError('Event loop is closed')>

The reason is batch client is creating AsyncClients without explicitly closing them.

@vutrung96 vutrung96 requested a review from CharlieJCJ November 14, 2024 05:13
Copy link
Contributor

@CharlieJCJ CharlieJCJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@CharlieJCJ CharlieJCJ merged commit 4de0c76 into dev Nov 14, 2024
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.

2 participants