Styled and better process handling
This commit is contained in:
parent
61072ee032
commit
a4aeb113bf
5 changed files with 8 additions and 8 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue