Enhance installation state management and diagnostics for ComfyUI
- Updated the `gpu-rent` logic to ensure the `IsInstalled` flag is accurately set based on the presence of ComfyUI, preventing conflicts during installation. - Improved the handling of the `/mnt/swarm_data` directory to skip creation if it does not exist, enhancing robustness in provisioning. - Added tests to validate the new installation state checks and ensure proper diagnostics during the installation process, including scenarios for clearing and setting the `IsInstalled` flag.
This commit is contained in:
@@ -490,6 +490,9 @@ for p in uniq:
|
||||
continue
|
||||
if "/mnt/swarm_data/" not in str(p):
|
||||
continue
|
||||
if not Path("/mnt/swarm_data").is_dir():
|
||||
print(f"skip create {p}: /mnt/swarm_data нет")
|
||||
continue
|
||||
p.parent.mkdir(parents=True, exist_ok=True)
|
||||
p.write_text(
|
||||
"IsInstalled: true\n"
|
||||
|
||||
Reference in New Issue
Block a user