mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Run recorder shutdown tasks eagerly (#113018)
This commit is contained in:
parent
1d2c2d2055
commit
d8acd90370
@ -476,8 +476,12 @@ class Recorder(threading.Thread):
|
|||||||
def async_register(self) -> None:
|
def async_register(self) -> None:
|
||||||
"""Post connection initialize."""
|
"""Post connection initialize."""
|
||||||
bus = self.hass.bus
|
bus = self.hass.bus
|
||||||
bus.async_listen_once(EVENT_HOMEASSISTANT_CLOSE, self._async_close)
|
bus.async_listen_once(
|
||||||
bus.async_listen_once(EVENT_HOMEASSISTANT_FINAL_WRITE, self._async_shutdown)
|
EVENT_HOMEASSISTANT_CLOSE, self._async_close, run_immediately=True
|
||||||
|
)
|
||||||
|
bus.async_listen_once(
|
||||||
|
EVENT_HOMEASSISTANT_FINAL_WRITE, self._async_shutdown, run_immediately=True
|
||||||
|
)
|
||||||
async_at_started(self.hass, self._async_hass_started)
|
async_at_started(self.hass, self._async_hass_started)
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
|
Loading…
x
Reference in New Issue
Block a user