Add issues/suggestion to resolution center / start with diskspace (#2125)

Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
This commit is contained in:
Joakim Sørensen
2020-10-14 17:14:25 +02:00
committed by GitHub
parent d599c3ad76
commit 02e72726a5
13 changed files with 375 additions and 27 deletions

View File

@@ -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()