Skip to content

Commit

Permalink
feat: show restart confirm window when reconnected
Browse files Browse the repository at this point in the history
fixed: `uv` related crash
  • Loading branch information
ltdrdata committed Feb 2, 2025
1 parent 92aba95 commit 21b6c65
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
4 changes: 2 additions & 2 deletions glob/manager_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
from node_package import InstalledNodePackage


version_code = [3, 17]
version_code = [3, 17, 1]
version_str = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')


Expand Down Expand Up @@ -2432,7 +2432,7 @@ def check_state_of_git_node_pack_single(item, do_fetch=False, do_update_check=Tr

def get_installed_pip_packages():
# extract pip package infos
cmd = manager_util.make_pip_cmd(['pip', 'freeze'])
cmd = manager_util.make_pip_cmd(['freeze'])
pips = subprocess.check_output(cmd, text=True).split('\n')

res = {}
Expand Down
16 changes: 16 additions & 0 deletions js/custom-nodes-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ export class CustomNodesManager {
this.init();

api.addEventListener("cm-queue-status", this.onQueueStatus);
api.addEventListener('reconnected', this.onReconnected);
}

init() {
Expand Down Expand Up @@ -1406,6 +1407,20 @@ export class CustomNodesManager {
}
}

async onReconnected(event) {
let self = CustomNodesManager.instance;
if(self.need_restart) {
self.need_restart = false;

const confirmed = await customConfirm("To apply the changes to the node pack's installation status, you need to refresh the browser. Would you like to refresh?");
if (!confirmed) {
return;
}

window.location.reload(true);
}
}

async onQueueStatus(event) {
let self = CustomNodesManager.instance;
if(event.detail.status == 'in_progress' && event.detail.ui_target == 'nodepack_manager') {
Expand Down Expand Up @@ -1879,6 +1894,7 @@ export class CustomNodesManager {

showRestart() {
this.element.querySelector(".cn-manager-restart").style.display = "block";
this.need_restart = true;
}

showStop() {
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "comfyui-manager"
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
version = "3.17"
version = "3.17.1"
license = { file = "LICENSE.txt" }
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions"]

Expand Down

0 comments on commit 21b6c65

Please sign in to comment.