mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-10 11:29:51 +00:00
Add issues/suggestion to resolution center / start with diskspace (#2125)
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
This commit is contained in:
@@ -12,6 +12,7 @@ from ..exceptions import (
|
||||
MulticastError,
|
||||
ObserverError,
|
||||
)
|
||||
from ..resolution.const import MINIMUM_FREE_SPACE_THRESHOLD, IssueType
|
||||
|
||||
_LOGGER: logging.Logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -127,6 +128,11 @@ class Tasks(CoreSysAttributes):
|
||||
)
|
||||
continue
|
||||
|
||||
if self.sys_host.info.free_space > MINIMUM_FREE_SPACE_THRESHOLD:
|
||||
_LOGGER.warning("Not enough free space, pausing add-on updates")
|
||||
self.sys_resolution.issues = IssueType.FREE_SPACE
|
||||
return
|
||||
|
||||
# Run Add-on update sequential
|
||||
# avoid issue on slow IO
|
||||
_LOGGER.info("Add-on auto update process %s", addon.slug)
|
||||
@@ -145,6 +151,11 @@ class Tasks(CoreSysAttributes):
|
||||
_LOGGER.warning("Ignore Supervisor update on dev channel!")
|
||||
return
|
||||
|
||||
if self.sys_host.info.free_space > MINIMUM_FREE_SPACE_THRESHOLD:
|
||||
_LOGGER.warning("Not enough free space, pausing supervisor update")
|
||||
self.sys_resolution.issues = IssueType.FREE_SPACE
|
||||
return
|
||||
|
||||
_LOGGER.info("Found new Supervisor version")
|
||||
await self.sys_supervisor.update()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user