mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 05:37:44 +00:00
Prevent IQVIA from blocking other integrations' startup (#60001)
This commit is contained in:
parent
dedc4a8285
commit
8f6796f428
@ -51,6 +51,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
websession = aiohttp_client.async_get_clientsession(hass)
|
||||
client = Client(entry.data[CONF_ZIP_CODE], session=websession)
|
||||
|
||||
# We disable the client's request retry abilities here to avoid a lengthy (and
|
||||
# blocking) startup:
|
||||
client.disable_request_retries()
|
||||
|
||||
async def async_get_data_from_api(
|
||||
api_coro: Callable[..., Awaitable]
|
||||
) -> dict[str, Any]:
|
||||
@ -90,6 +94,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
# API calls fail:
|
||||
raise ConfigEntryNotReady()
|
||||
|
||||
# Once we've successfully authenticated, we re-enable client request retries:
|
||||
client.enable_request_retries()
|
||||
|
||||
hass.data.setdefault(DOMAIN, {})
|
||||
hass.data[DOMAIN][entry.entry_id] = coordinators
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
"name": "IQVIA",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/iqvia",
|
||||
"requirements": ["numpy==1.21.4", "pyiqvia==1.1.0"],
|
||||
"requirements": ["numpy==1.21.4", "pyiqvia==2021.11.0"],
|
||||
"codeowners": ["@bachya"],
|
||||
"iot_class": "cloud_polling"
|
||||
}
|
||||
|
@ -1556,7 +1556,7 @@ pyipma==2.0.5
|
||||
pyipp==0.11.0
|
||||
|
||||
# homeassistant.components.iqvia
|
||||
pyiqvia==1.1.0
|
||||
pyiqvia==2021.11.0
|
||||
|
||||
# homeassistant.components.irish_rail_transport
|
||||
pyirishrail==0.0.2
|
||||
|
@ -944,7 +944,7 @@ pyipma==2.0.5
|
||||
pyipp==0.11.0
|
||||
|
||||
# homeassistant.components.iqvia
|
||||
pyiqvia==1.1.0
|
||||
pyiqvia==2021.11.0
|
||||
|
||||
# homeassistant.components.isy994
|
||||
pyisy==3.0.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user