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: Use aiohttp instead of waiting for blocking calls #227

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

chemwolf6922
Copy link
Contributor

@chemwolf6922 chemwolf6922 commented Dec 19, 2024

Why is this change made

The original http requests in miot_cloud.py use a async wrapper around a blocking call. Which will spawn a new thread for each http call.

Changes

  • Use native event loop async http calls from aiohttp instead.
  • Add aiohttp as a dependency.

Tests

Tested with my local setup. Tested adding device & controlling device through cloud.

@chemwolf6922
Copy link
Contributor Author

The nl translation does not have a entry in the list. Causing the test to fail.

@chemwolf6922 chemwolf6922 marked this pull request as ready for review December 19, 2024 15:46
@chemwolf6922
Copy link
Contributor Author

Please use squash merge on this one. The commit history is really messy.

@chemwolf6922 chemwolf6922 changed the title Use aiohttp instead of waiting for blocking calls feat: Use aiohttp instead of waiting for blocking calls Dec 20, 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