Enhance access link collection and backend status reporting

- Updated the `collect_access_links` function to provide clearer user-facing endpoint labels and notes, particularly for non-tunneled scenarios.
- Improved logging messages in the provisioning process to reflect the status of the SwarmUI and Ollama API, enhancing user feedback during setup.
- Added human-readable status messages for backend loading and running states, improving clarity during the waiting process.
- Updated tests to verify the new behavior and ensure accurate reporting of access links and backend statuses.
This commit is contained in:
Leonid Pershin
2026-08-21 09:34:13 +03:00
parent a622265bb5
commit 281ae15b12
5 changed files with 85 additions and 47 deletions
+9 -1
View File
@@ -60,6 +60,11 @@ while time.time() < deadline:
# No backends registered — Comfy never installed (Install wizard).
# Not "Idle": treat as wait, never ready.
print("BUSY backend=empty (нужен first-install Comfy)")
elif bstat == "loading":
print("BUSY backend=loading (Comfy стартует, ждём Idle)")
elif bstat == "running":
# Self-start often reports running while still warming / first load.
print("BUSY backend=running (Comfy прогрев, ждём Idle)")
elif bstat in ("disabled", "all_disabled"):
print(f"BUSY backend={bstat}")
elif bstat == "idle":
@@ -158,7 +163,10 @@ def wait_backend_idle(
) -> None:
"""Block until SwarmUI on the VM reports Idle backend (or timeout)."""
deadline = time.time() + timeout
log("жду HTTP :7801 и Idle backend на VM…")
log(
"жду Idle backend на VM (loading/running — норма, Comfy прогревается; "
"ссылки :17801 — после ready + tunnel)"
)
last = ""
while time.time() < deadline:
try: