Update backend status handling and improve user notifications

- Enhanced documentation to clarify the transition from 'Idle' to 'ready (running)' for backend states, improving user understanding of system readiness.
- Updated logging messages in the notification system to reflect the new backend status terminology, ensuring accurate feedback during operations.
- Refined access link collection logic to better handle tunneled and non-tunneled scenarios, enhancing user experience.
- Improved tests to validate the new backend status handling and ensure accurate reporting of access links and notifications.
This commit is contained in:
Leonid Pershin
2026-08-21 09:53:48 +03:00
parent 281ae15b12
commit 3e0a51cac4
11 changed files with 173 additions and 116 deletions
+12 -13
View File
@@ -5,21 +5,20 @@ from gpu_rent.ready import _REMOTE_POLL
def test_remote_poll_empty_is_busy_not_ready():
assert 'bstat == "empty"' in _REMOTE_POLL
assert 'BUSY backend=empty' in _REMOTE_POLL
# Must not treat empty as READY anymore
assert '("idle", "disabled", "all_disabled", "empty")' not in _REMOTE_POLL
assert "BUSY backend=empty" in _REMOTE_POLL
def test_remote_poll_idle_is_ready():
assert 'bstat == "idle"' in _REMOTE_POLL
assert "READY backend=" in _REMOTE_POLL
def test_remote_poll_loading_running_humanized():
assert "Comfy стартует" in _REMOTE_POLL
assert "Comfy прогрев" in _REMOTE_POLL
assert 'bstat == "loading"' in _REMOTE_POLL
def test_remote_poll_running_is_ready():
"""SwarmUI: running = healthy ready; idle = suspended (cannot generate)."""
assert 'bstat == "running"' in _REMOTE_POLL
assert "READY backend=running" in _REMOTE_POLL
assert "READY backend=idle" not in _REMOTE_POLL
assert "BUSY backend=idle" in _REMOTE_POLL
def test_remote_poll_loading_is_busy():
assert 'bstat in ("loading", "some_loading")' in _REMOTE_POLL
assert "Comfy стартует" in _REMOTE_POLL
def test_install_swarm_comfy_script_payload():
@@ -34,7 +33,7 @@ def test_install_swarm_comfy_script_payload():
assert "modern_dark" in text
assert "detect_stage" in text
assert "dlbackend=" in text
assert 'end="\\r"' in text or "end=\"\\r\"" in text
assert 'end="\\r"' in text or 'end="\\r"' in text
def test_verify_gpu_env_fail_fast_empty_dlbackend(monkeypatch):