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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user