Enhance backend recovery and diagnostics in installation and tuning scripts
- Improved the `install_swarm_comfy` function to handle empty backend states more effectively, introducing recovery mechanisms and enhanced logging for better visibility. - Updated the `tune_swarm_perf` function to always sanitize backend FDS corruption, ensuring consistent performance tuning. - Added new tests to validate the functionality of backend recovery and FDS sanitization, ensuring robustness in backend management.
This commit is contained in:
@@ -657,11 +657,21 @@ def main() -> int:
|
||||
return 0
|
||||
|
||||
if comfy_venv_ok() and bstat == "empty":
|
||||
if installed is not True:
|
||||
print("venv есть, IsInstalled=false — запускаю InstallConfirmWS")
|
||||
print(
|
||||
"backend empty при venv/IsInstalled — recover (sanitize FDS / AddNewBackend)…",
|
||||
flush=True,
|
||||
)
|
||||
bstat = recover_empty_backends()
|
||||
if bstat not in ("empty", "unknown") and not bstat.startswith("error:"):
|
||||
print(f"recovered empty → {bstat}")
|
||||
return 0
|
||||
if installed is True:
|
||||
print(
|
||||
"WARN: всё ещё empty после recover — пробую InstallConfirmWS",
|
||||
flush=True,
|
||||
)
|
||||
else:
|
||||
run_diagnostics()
|
||||
return 1
|
||||
print("venv есть, IsInstalled=false — запускаю InstallConfirmWS")
|
||||
|
||||
marker = DATA / ".gpu-rent-comfy-installing"
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user