Update documentation to clarify GPU control commands

- Revised README, architecture, CLI, and other documentation to specify that both `Ctrl+C` and `Ctrl+D` now stop the GPU while preserving disk data, correcting previous inaccuracies.
- Enhanced access card and setup instructions to reflect the updated command behavior for better user understanding.
- Updated tests to ensure the new command behaviors are validated and documented correctly, improving overall clarity in GPU management.
This commit is contained in:
Leonid Pershin
2026-08-21 20:12:03 +03:00
parent a882964ce0
commit f8f8dcc93e
14 changed files with 81 additions and 79 deletions
+5 -3
View File
@@ -145,6 +145,7 @@ def _stub_tunnel(monkeypatch) -> None:
monkeypatch.setattr("gpu_rent.tunnel.save_state", lambda s: None)
monkeypatch.setattr("gpu_rent.access_card.print_access_card", lambda *a, **k: None)
monkeypatch.setattr("gpu_rent.local_watchdog.watchdog_installed", lambda: False)
monkeypatch.setattr("gpu_rent.local_watchdog.clear_lease", lambda: None)
def test_run_tunnel_ctrl_d_stops_gpu(monkeypatch):
@@ -163,7 +164,7 @@ def test_run_tunnel_ctrl_d_stops_gpu(monkeypatch):
assert any("GPU остановлен" in x for x in logs)
def test_run_tunnel_ctrl_c_keeps_gpu(monkeypatch):
def test_run_tunnel_ctrl_c_stops_gpu(monkeypatch):
_stub_tunnel(monkeypatch)
logs: list[str] = []
stopped: list[bool] = []
@@ -178,5 +179,6 @@ def test_run_tunnel_ctrl_c_keeps_gpu(monkeypatch):
wait=boom,
stop_gpu=lambda: stopped.append(True),
)
assert stopped == []
assert any("GPU жив" in x for x in logs)
assert stopped == [True]
assert any("GPU остановлен" in x for x in logs)
assert not any("GPU жив" in x for x in logs)