Skip to content

Commit 08b7819

Browse files
committed
Add dedicated version update refresh
Currently we have the /refresh_updates endpoint which updates the main component versions (Core, OS, Supervisor, Plug-ins) and the add-on store at the same time. This leads to much more updates then necessary. To allow more fine grained update refresh control introduce a new endpoint /refresh_update which only refreshes the main component versions. The /store/reload endpoint already allows to update the add-on store only.
1 parent 9d062c8 commit 08b7819

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

supervisor/api/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ def _register_root(self) -> None:
346346

347347
self.webapp.add_routes([web.get("/info", api_root.info)])
348348
self.webapp.add_routes([web.post("/refresh_updates", api_root.refresh_updates)])
349+
self.webapp.add_routes([web.post("/reload_updates", api_root.reload_updates)])
349350
self.webapp.add_routes(
350351
[web.get("/available_updates", api_root.available_updates)]
351352
)

supervisor/api/root.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,8 @@ async def refresh_updates(self, request: web.Request) -> None:
113113
await asyncio.shield(
114114
asyncio.gather(self.sys_updater.reload(), self.sys_store.reload())
115115
)
116+
117+
@api_process
118+
async def reload_updates(self, request: web.Request) -> None:
119+
"""Refresh updater update information."""
120+
await self.sys_updater.reload()

0 commit comments

Comments
 (0)