mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Add a message to the config entry cancel call (#96925)
This commit is contained in:
parent
955bed0128
commit
6bb81b862c
@ -692,8 +692,9 @@ class ConfigEntry:
|
||||
if not self._tasks and not self._background_tasks:
|
||||
return
|
||||
|
||||
cancel_message = f"Config entry {self.title} with {self.domain} unloading"
|
||||
for task in self._background_tasks:
|
||||
task.cancel()
|
||||
task.cancel(cancel_message)
|
||||
|
||||
_, pending = await asyncio.wait(
|
||||
[*self._tasks, *self._background_tasks], timeout=10
|
||||
@ -885,7 +886,9 @@ class ConfigEntriesFlowManager(data_entry_flow.FlowManager):
|
||||
"""Cancel any initializing flows."""
|
||||
for task_list in self._initialize_tasks.values():
|
||||
for task in task_list:
|
||||
task.cancel()
|
||||
task.cancel(
|
||||
"Config entry initialize canceled: Home Assistant is shutting down"
|
||||
)
|
||||
await self._discovery_debouncer.async_shutdown()
|
||||
|
||||
async def async_finish_flow(
|
||||
|
Loading…
x
Reference in New Issue
Block a user