Closed shortbloke closed 1 year ago
@glpatcern Turned out to be very simple.
Can't be so simple :-D
Jokes apart, shouldn't we replace that with an equivalent decorator for async initialization to properly work? What are other integrations doing?
Looking at other components, I don't see any additional changes being made. The code had already changed the functions to include the async prefix and there's no use of yield
.
Now, that's not to say there aren't some improvements still to be made. The component takes ~100 seconds to start for me,
Fixed #30 coroutine decorator was deprecated in Python 3.8 and removed from Python 3.11, per: https://docs.python.org/3.10/library/asyncio-task.html#generator-based-coroutines