2022-07-18 21:43:10 +00:00
|
|
|
import path from "node:path";
|
|
|
|
import Executor from "../../sockets/clients/Executor.js";
|
|
|
|
import { normalize } from "./executor-configurator.js";
|
|
|
|
const { default: executorConfig } = await import(
|
|
|
|
path.resolve("executor.config.js")
|
|
|
|
);
|
|
|
|
|
|
|
|
// Load config and args
|
|
|
|
const args = process.argv.slice(2);
|
2022-08-09 04:29:10 +00:00
|
|
|
const payload = JSON.parse(Buffer.from(args[0], "base64").toString("utf8"));
|
|
|
|
const config = normalize(executorConfig(payload));
|
2022-07-18 21:43:10 +00:00
|
|
|
// Start Executor
|
2022-08-09 04:29:10 +00:00
|
|
|
const exec = new Executor(config, payload);
|
2022-07-18 21:43:10 +00:00
|
|
|
exec.runJob();
|