Updated Core
This commit is contained in:
parent
8b136eb565
commit
88ebfe4da2
25 changed files with 5678 additions and 1932 deletions
|
@ -30,7 +30,7 @@ export default class Executor {
|
|||
}
|
||||
|
||||
spawn() {
|
||||
const cmdArgs = this.job.command.split(" ");
|
||||
const cmdArgs = this.job.command;
|
||||
const cmd = cmdArgs.shift();
|
||||
this.proc = cp.spawn(cmd, cmdArgs);
|
||||
|
||||
|
@ -67,6 +67,7 @@ export default class Executor {
|
|||
report(d, dType) {
|
||||
this.buf[dType] += d;
|
||||
if (!this.buf[dType].includes("\n")) return;
|
||||
if(this.buf[dType].endsWith("\n")) this.buf[dType] = this.buf[dType].slice(0, -1);
|
||||
this.socket.emit(events.JOB_REP, this.buf[dType]);
|
||||
if (dType === ERR) console.error(`err: ${this.buf[dType]}`);
|
||||
else console.log(`out: ${this.buf[dType]}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue