mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix recorder does not vacuum SQLite DB on purge (#9469)
This commit is contained in:
parent
5f24cc229d
commit
2219dcaee5
@ -26,6 +26,7 @@ def purge_old_data(instance, purge_days):
|
||||
_LOGGER.debug("Deleted %s events", deleted_rows)
|
||||
|
||||
# Execute sqlite vacuum command to free up space on disk
|
||||
if instance.engine.driver == 'sqlite':
|
||||
_LOGGER.debug("DB engine driver: %s", instance.engine.driver)
|
||||
if instance.engine.driver == 'pysqlite':
|
||||
_LOGGER.info("Vacuuming SQLite to free space")
|
||||
instance.engine.execute("VACUUM")
|
||||
|
Loading…
x
Reference in New Issue
Block a user