Fully fix race in removing entities (#111499)

Full fix race in removing entities

Followup to #110978 now that we can start the task
eagerly it completely closes the race window
This commit is contained in:
J. Nick Koston 2024-02-26 18:55:15 -10:00 committed by GitHub
parent f984cca49b
commit ce0fb1e716
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1457,7 +1457,7 @@ class Entity(
self._removed_from_registry = is_remove
if action == "update" or is_remove:
self.hass.async_create_task(
self._async_process_registry_update_or_remove(event)
self._async_process_registry_update_or_remove(event), eager_start=True
)
async def _async_process_registry_update_or_remove(