Styled and better process handling

This commit is contained in:
Dunemask 2022-07-19 01:39:57 +00:00
parent 61072ee032
commit a4aeb113bf
5 changed files with 8 additions and 8 deletions

View file

@ -14,10 +14,8 @@ const OUT = "o";
export default class Executor {
constructor(args, config, options = {}) {
this.url = config.url(args) ?? process.env.QUALITEER_URL;
this.jobId =
config.jobId(args) ?? process.env.QUALITEER_JOB_ID;
this.command =
config.command(args) ?? process.env.QUALITEER_COMMAND;
this.jobId = config.jobId(args) ?? process.env.QUALITEER_JOB_ID;
this.command = config.command(args) ?? process.env.QUALITEER_COMMAND;
this.mode = modes.EXEC;
// Internal Buffer
@ -58,7 +56,7 @@ export default class Executor {
onClose() {
console.log("Server disconnected, terminating process.");
this.proc.kill("SIGKILL");
if (this.proc) this.proc.kill("SIGKILL");
}
onProcClose(code) {