Upgrades people!

This commit is contained in:
Dunemask 2022-08-09 04:29:10 +00:00
parent f84234150f
commit 8ad56e8d38
40 changed files with 483 additions and 379 deletions

View file

@ -7,8 +7,8 @@ const { command } = job.spec.template.spec.containers[0];
INFO("EXEC", "Internal Executor Starting!");
cp.exec(command, (error, stdout, stderr) => {
if (error) ERR("EXEC", error);
//if(stdout) VERB("EXEC-STDOUT", stdout);
//if(stderr) VERB("EXEC-STDERR", stderr);
//if (stdout) VERB("EXEC-STDOUT", stdout);
//if (stderr) VERB("EXEC-STDERR", stderr);
OK("EXEC", "Internal Executor Finished!");
process.exit(error ? 1 : 0);
});

View file

@ -22,9 +22,11 @@ const wrapCommand = (jobId, command) => {
? `node ${executorBin}`
: `chmod +x ${executorBin} && ./${executorBin}`;
const cmd = command.map((arg) => JSON.stringify(arg));
const curlCmd = `curl -o qltr-executor ${executorUrl} && ${bin} ${qualiteerUrl} ${jobId} ${cmd.join(
" "
)}`;
const payload = Buffer.from(
JSON.stringify({ jobId, command, url: qualiteerUrl }),
"utf8"
).toString("base64");
const curlCmd = `curl -o qltr-executor ${executorUrl} && ${bin} ${payload}`;
return curlCmd;
};