From 638dbf178ec011e5382351c164a5e46093270ebe Mon Sep 17 00:00:00 2001 From: Louis Date: Tue, 26 Nov 2024 19:03:26 +0700 Subject: [PATCH] fix: 4012 - active model should be gone as soon as cortex.cpp server is killed --- extensions/inference-cortex-extension/src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/inference-cortex-extension/src/index.ts b/extensions/inference-cortex-extension/src/index.ts index 531b407f2..79c6c8bfc 100644 --- a/extensions/inference-cortex-extension/src/index.ts +++ b/extensions/inference-cortex-extension/src/index.ts @@ -70,7 +70,7 @@ export default class JanInferenceCortexExtension extends LocalOAIEngine { super.onLoad() this.queue.add(() => this.clean()) - + // Run the process watchdog const systemInfo = await systemInformation() this.queue.add(() => executeOnMain(NODE, 'run', systemInfo)) @@ -251,6 +251,7 @@ export default class JanInferenceCortexExtension extends LocalOAIEngine { this.socket.onclose = (event) => { console.log('WebSocket closed:', event) + events.emit(ModelEvent.OnModelStopped, {}) if (this.shouldReconnect) { console.log(`Attempting to reconnect...`) setTimeout(() => this.subscribeToEvents(), 1000)