1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Limit executor imports to a single thread (#111898)

* Limit executor imports to a single thread

* test for import executor

* test for import executor

* test for import executor

* fixes

* better fix
This commit is contained in:
J. Nick Koston
2024-02-29 16:02:13 -10:00
committed by GitHub
parent 3b93c21d9d
commit 25510fc13c
4 changed files with 35 additions and 4 deletions

View File

@@ -853,7 +853,7 @@ class Integration:
# So we do it before validating config to catch these errors.
if load_executor:
try:
comp = await self.hass.async_add_executor_job(self.get_component)
comp = await self.hass.async_add_import_executor_job(self.get_component)
except ImportError as ex:
load_executor = False
_LOGGER.debug("Failed to import %s in executor", domain, exc_info=ex)
@@ -924,7 +924,7 @@ class Integration:
try:
if load_executor:
try:
platform = await self.hass.async_add_executor_job(
platform = await self.hass.async_add_import_executor_job(
self._load_platform, platform_name
)
except ImportError as ex: