Intelligent timeout handler for setup/bootstrap (#38329)

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
authored and GitHub committed 2020-08-05 14:58:19 +02:00
1 parent caca762088
commit c291d4aa7d
21 files changed
+901 -89

No files matched your search

+2 -1
View File
@@ -177,7 +177,8 @@ class EntityPlatform:
try:
task = async_create_setup_task()
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
async with hass.timeout.async_timeout(SLOW_SETUP_MAX_WAIT, self.domain):
await asyncio.shield(task)
# Block till all entities are done
if self._tasks: