mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-18 14:46:30 +00:00
Fix old issues attach to Issues list (#2148)
This commit is contained in:
parent
e684223f32
commit
7a1d85ca2b
@ -12,7 +12,7 @@ from ..exceptions import (
|
|||||||
MulticastError,
|
MulticastError,
|
||||||
ObserverError,
|
ObserverError,
|
||||||
)
|
)
|
||||||
from ..resolution.const import MINIMUM_FREE_SPACE_THRESHOLD, IssueType
|
from ..resolution.const import MINIMUM_FREE_SPACE_THRESHOLD, ContextType, IssueType
|
||||||
|
|
||||||
_LOGGER: logging.Logger = logging.getLogger(__name__)
|
_LOGGER: logging.Logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -128,10 +128,14 @@ class Tasks(CoreSysAttributes):
|
|||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if self.sys_host.info.free_space > MINIMUM_FREE_SPACE_THRESHOLD:
|
if self.sys_host.info.free_space < MINIMUM_FREE_SPACE_THRESHOLD:
|
||||||
_LOGGER.warning("Not enough free space, pausing add-on updates")
|
_LOGGER.warning(
|
||||||
_LOGGER.info("Aviable free space is %s", self.sys_host.info.free_space)
|
"Not enough free space, pausing add-on updates - available space %f",
|
||||||
self.sys_resolution.issues = IssueType.FREE_SPACE
|
self.sys_host.info.free_space,
|
||||||
|
)
|
||||||
|
self.sys_resolution.create_issue(
|
||||||
|
IssueType.FREE_SPACE, ContextType.SYSTEM
|
||||||
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
# Run Add-on update sequential
|
# Run Add-on update sequential
|
||||||
@ -152,10 +156,12 @@ class Tasks(CoreSysAttributes):
|
|||||||
_LOGGER.warning("Ignore Supervisor updates on dev channel!")
|
_LOGGER.warning("Ignore Supervisor updates on dev channel!")
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.sys_host.info.free_space > MINIMUM_FREE_SPACE_THRESHOLD:
|
if self.sys_host.info.free_space < MINIMUM_FREE_SPACE_THRESHOLD:
|
||||||
_LOGGER.warning("Not enough free space, pausing supervisor update")
|
_LOGGER.warning(
|
||||||
_LOGGER.info("Aviable free space is %s", self.sys_host.info.free_space)
|
"Not enough free space, pausing supervisor update - available space %s",
|
||||||
self.sys_resolution.issues = IssueType.FREE_SPACE
|
self.sys_host.info.free_space,
|
||||||
|
)
|
||||||
|
self.sys_resolution.create_issue(IssueType.FREE_SPACE, ContextType.SYSTEM)
|
||||||
return
|
return
|
||||||
|
|
||||||
_LOGGER.info(
|
_LOGGER.info(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user