From 916ab40d65c9c25f63256f2cd98be297c3da2208 Mon Sep 17 00:00:00 2001 From: Jakob Stendahl Date: Thu, 28 Apr 2022 20:06:38 +0200 Subject: :bug: Small bugfixes --- src/NeoRuntimeManager/RuntimeProcess.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/NeoRuntimeManager/RuntimeProcess.js') diff --git a/src/NeoRuntimeManager/RuntimeProcess.js b/src/NeoRuntimeManager/RuntimeProcess.js index c5c4749..be78fa9 100644 --- a/src/NeoRuntimeManager/RuntimeProcess.js +++ b/src/NeoRuntimeManager/RuntimeProcess.js @@ -23,12 +23,12 @@ class RuntimeProcess { start() { if (this.isRunning) { console.log("PROCESS ALREADY RUNNING"); - return; + return {success: false, reason: "already running"}; } this.isRunning = true; this.proc = spawn.spawn( - `${__appdir}/NeoRuntime/Runtime/venv/bin/python`, - //"python", + // `${__appdir}/NeoRuntime/Runtime/venv/bin/python`, + "python3", [ "-u", // This makes us able to get real-time output `${__appdir}/NeoRuntime/Runtime/neo_runtime.py`, @@ -75,6 +75,7 @@ class RuntimeProcess { this.exitCode = code; }); + return {success: true}; } stop(restart=false) { @@ -85,8 +86,10 @@ class RuntimeProcess { }); } this.proc.kill("SIGINT"); + return {success: true} } catch (err) { console.log(err); + return {success:false, reason:err} } } } -- cgit v1.2.3