aboutsummaryrefslogtreecommitdiff
path: root/src/NeoRuntimeManager/RuntimeProcess.js
diff options
context:
space:
mode:
authorJakob Stendahl <jakob.stendahl@outlook.com>2022-04-28 20:06:38 +0200
committerJakob Stendahl <jakob.stendahl@outlook.com>2022-04-28 20:08:55 +0200
commit916ab40d65c9c25f63256f2cd98be297c3da2208 (patch)
treedcf07544310fd34f79e72f34ef0e653f30a163f0 /src/NeoRuntimeManager/RuntimeProcess.js
parent4ee57ab935718a269fe7ab65b26ff27837d49003 (diff)
downloadLuxcena-Neo-916ab40d65c9c25f63256f2cd98be297c3da2208.tar.gz
Luxcena-Neo-916ab40d65c9c25f63256f2cd98be297c3da2208.zip
:bug: Small bugfixes
Diffstat (limited to 'src/NeoRuntimeManager/RuntimeProcess.js')
-rw-r--r--src/NeoRuntimeManager/RuntimeProcess.js9
1 files changed, 6 insertions, 3 deletions
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}
}
}
}