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
Make Throttle async aware #13027
Make Throttle async aware #13027
Conversation
"""Get the latest data from luftdaten.info and update the state.""" | ||
try: | ||
yield from self.luftdaten.async_update() | ||
except TypeError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this type error because that would happen if Throttle was returning None
…
* Make Throttle async aware * Lint
Heres the sabnzdb log (I'm home now and I can paste it - not on iPad now)
|
sabnzdb has been fixed in #13042 |
I think the Tado component suffers from the same issue (Also like #13012)
|
@thomasvt1 thanks for the report, opened #13078 with a fix |
Description:
Throttle was not async aware. With coroutines these errors got swallowed but with async/await they surfaced, which is good as now we have been able to squash a bunch of bugs.
Found all instances where we combined an
@async.coroutine
with a@Throttle
. I've converted them all to async/await and also fixed the Throttle decorator.Found all instances with:
Related issue (if applicable): fixes #13012
Checklist:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices: