Start and stop template cache watcher to run_immediately (#113644)
This commit is contained in:
parent
68320b1278
commit
4d75940cd2
1 changed files with 6 additions and 2 deletions
|
@ -209,8 +209,12 @@ def async_setup(hass: HomeAssistant) -> bool:
|
|||
cancel = async_track_time_interval(
|
||||
hass, _async_adjust_lru_sizes, timedelta(minutes=10)
|
||||
)
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_START, _async_adjust_lru_sizes)
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, callback(lambda _: cancel()))
|
||||
hass.bus.async_listen_once(
|
||||
EVENT_HOMEASSISTANT_START, _async_adjust_lru_sizes, run_immediately=True
|
||||
)
|
||||
hass.bus.async_listen_once(
|
||||
EVENT_HOMEASSISTANT_STOP, callback(lambda _: cancel()), run_immediately=True
|
||||
)
|
||||
return True
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue