From 06e26eba88cd7069bd767cf4fcdfa81a100cd522 Mon Sep 17 00:00:00 2001 From: niknah Date: Sun, 8 Feb 2026 15:25:35 +1100 Subject: [PATCH] Fix problem with not starting up. --- WebBuilder.py | 11 +++++++---- js/presentation.js | 4 ++-- presentation-site/hooks/hooks.js | 2 +- pyproject.toml | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/WebBuilder.py b/WebBuilder.py index 6af5cd0..54690be 100644 --- a/WebBuilder.py +++ b/WebBuilder.py @@ -41,8 +41,6 @@ class WebBuilder: self.dest_path, "components/tabs" ) - if not os.path.exists(self.tabs_path): - os.mkdir(self.tabs_path) WebBuilder.exit_handler_done = False self.userRequestedStopFile = os.path.join( @@ -83,9 +81,14 @@ class WebBuilder: with open(file, "w", encoding="utf-8") as f: f.write(s) + def get_tabs_path(self): + if not os.path.exists(self.tabs_path): + os.mkdir(self.tabs_path) + return self.tabs_path + def make_tab_list(self): workflows_list_path = os.path.join( - self.tabs_path, + self.get_tabs_path(), "WorkflowsList.js" ) tab_list_path = os.path.join( @@ -252,7 +255,7 @@ class WebBuilder: ), json.dumps(workflow)) self.write_file(os.path.join( - self.tabs_path, + self.get_tabs_path(), f"{camelTabName}.vue" ), template) diff --git a/js/presentation.js b/js/presentation.js index 986f36e..2d69051 100644 --- a/js/presentation.js +++ b/js/presentation.js @@ -721,12 +721,12 @@ class PresentationTab { const restartName = 'Restart'; const restartButton = node.addWidget('button', restartName, "", async () => { console.log('presentation.restart'); - restartButton.name = '⟳ ' + restartName; + restartButton.name = `⟳ ${restartName}`; const result = await t.restartNuxt(); if (!result.ok) { console.error('restart failed', result.message); } else { - restartButton.name = '✓ ' + restartName; + restartButton.name = `✓ ${restartName}`; setTimeout(() => { restartButton.name = restartName; }, 5000); diff --git a/presentation-site/hooks/hooks.js b/presentation-site/hooks/hooks.js index 0b4fa38..b437bec 100644 --- a/presentation-site/hooks/hooks.js +++ b/presentation-site/hooks/hooks.js @@ -9,7 +9,7 @@ export default (/* nuxtConfig */) => ({ process.on('exit', () => { console.error('Shutdown'); try { - fs.unlink(pidFilePath); + fs.unlink(pidFilePath, () => {}); } catch(e) { console.error(`Could not remove pid file: ${pidFilePath}, ${e}`); } diff --git a/pyproject.toml b/pyproject.toml index 51ff43a..3fca8ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "presentation-ComfyUI" description = "Turn ComfyUI workflow to a website UI" -version = "0.9.2" +version = "0.9.3" license = {text = "MIT License"} [project.urls]