fix(updates): skip redownloading cached packages and disable background updater in CI
CI Test Suite / Run Component Tests & Pipeline Verification (push) Canceled after 0s
Build and Push LOGAR Runner / Build & Push Runner Image (push) Successful in 7m52s
Release Binaries & Packages / Build & Release Standalone Binaries (Linux & Windows Cross-Compilation) (push) Successful in 8m6s
CI Test Suite / Run Component Tests & Pipeline Verification (push) Canceled after 0s
Build and Push LOGAR Runner / Build & Push Runner Image (push) Successful in 7m52s
Release Binaries & Packages / Build & Release Standalone Binaries (Linux & Windows Cross-Compilation) (push) Successful in 8m6s
This commit is contained in:
@@ -18,6 +18,7 @@ jobs:
|
|||||||
runs-on: logar
|
runs-on: logar
|
||||||
env:
|
env:
|
||||||
PYTHONPATH: .
|
PYTHONPATH: .
|
||||||
|
LOGAR_DISABLE_AUTO_UPDATE: "1"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|||||||
+4
-2
@@ -2232,8 +2232,10 @@ async def update_checker_loop(interval_hours: int = 1):
|
|||||||
Background worker that periodically queries the upstream repository
|
Background worker that periodically queries the upstream repository
|
||||||
and automatically downloads/caches client binary update packages locally on the Hub.
|
and automatically downloads/caches client binary update packages locally on the Hub.
|
||||||
"""
|
"""
|
||||||
# Brief initial pause after socket startup
|
if os.environ.get("LOGAR_DISABLE_AUTO_UPDATE", "").lower() in ("1", "true", "yes"):
|
||||||
await asyncio.sleep(5)
|
return
|
||||||
|
initial_delay = int(os.environ.get("LOGAR_UPDATE_CHECK_INITIAL_DELAY", "60"))
|
||||||
|
await asyncio.sleep(initial_delay)
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
mgr: ServerUpdateManager = SERVER_STATE.get("update_manager") or UPDATE_MANAGER
|
mgr: ServerUpdateManager = SERVER_STATE.get("update_manager") or UPDATE_MANAGER
|
||||||
|
|||||||
@@ -327,6 +327,12 @@ class ServerUpdateManager:
|
|||||||
if not target_os:
|
if not target_os:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# Check if matching version is already cached locally
|
||||||
|
existing_pkg = self.get_hosted_packages().get(target_os)
|
||||||
|
if existing_pkg and existing_pkg.get("exists") and existing_pkg.get("version") == version:
|
||||||
|
results[target_os] = True
|
||||||
|
continue
|
||||||
|
|
||||||
filename = os.path.basename(asset.get("name") or f"client_{target_os}")
|
filename = os.path.basename(asset.get("name") or f"client_{target_os}")
|
||||||
temp_file = os.path.join(temp_dir, filename)
|
temp_file = os.path.join(temp_dir, filename)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user