MCPcopy
hub / github.com/gpustack/gpustack / get_update

Function get_update

gpustack/server/update_check.py:28–42  ·  view source on GitHub ↗
(update_check_url: Optional[str] = None)

Source from the content-addressed store, hash-verified

26
27
28async def get_update(update_check_url: Optional[str] = None) -> UpdateResponse:
29 if is_dev_version():
30 return UpdateResponse(latest_version=__version__)
31
32 global cached_update, cache_timestamp
33
34 if (
35 cached_update is None
36 or cache_timestamp is None
37 or time.time() - cache_timestamp > UPDATE_CACHE_TIMEOUT
38 ):
39 cached_update = await do_get_update(update_check_url)
40 cache_timestamp = time.time()
41
42 return cached_update
43
44
45async def do_get_update(

Callers 2

updateFunction · 0.90
startMethod · 0.85

Calls 3

is_dev_versionFunction · 0.85
UpdateResponseClass · 0.85
do_get_updateFunction · 0.85

Tested by

no test coverage detected