mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-13 20:26:29 +00:00
Enable asyncio debug in developer mode (#3348)
This commit is contained in:
parent
54e6ae5fd9
commit
3fbecf89db
@ -39,6 +39,7 @@ if __name__ == "__main__":
|
||||
|
||||
_LOGGER.info("Initializing Supervisor setup")
|
||||
coresys = loop.run_until_complete(bootstrap.initialize_coresys())
|
||||
loop.set_debug(coresys.config.debug)
|
||||
loop.run_until_complete(coresys.core.connect())
|
||||
|
||||
bootstrap.supervisor_debugger(coresys)
|
||||
|
@ -47,7 +47,7 @@ class StoreManager(CoreSysAttributes):
|
||||
|
||||
async def load(self) -> None:
|
||||
"""Start up add-on management."""
|
||||
self.data.update()
|
||||
await self.data.update()
|
||||
|
||||
# Init Supervisor built-in repositories
|
||||
repositories = set(self.sys_config.addons_repositories) | BUILTIN_REPOSITORIES
|
||||
@ -126,7 +126,7 @@ class StoreManager(CoreSysAttributes):
|
||||
self.sys_config.drop_addon_repository(url)
|
||||
|
||||
# update data
|
||||
self.data.update()
|
||||
await self.data.update()
|
||||
self._read_addons()
|
||||
|
||||
def _read_addons(self) -> None:
|
||||
|
@ -1,7 +1,7 @@
|
||||
"""Init file for Supervisor add-on data."""
|
||||
import logging
|
||||
from pathlib import Path
|
||||
from typing import Any, Optional
|
||||
from typing import Any, Awaitable, Optional
|
||||
|
||||
import voluptuous as vol
|
||||
from voluptuous.humanize import humanize_error
|
||||
@ -37,8 +37,11 @@ class StoreData(CoreSysAttributes):
|
||||
self.repositories: dict[str, Any] = {}
|
||||
self.addons: dict[str, Any] = {}
|
||||
|
||||
def update(self) -> None:
|
||||
async def update(self) -> Awaitable[None]:
|
||||
"""Read data from add-on repository."""
|
||||
return await self.sys_run_in_executor(self._update)
|
||||
|
||||
def _update(self) -> None:
|
||||
self.repositories.clear()
|
||||
self.addons.clear()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user