pain, lots of pain
This commit is contained in:
parent
198b6dbcac
commit
f0734bba00
1 changed files with 2 additions and 2 deletions
|
@ -32,11 +32,11 @@ const { v4: uuidv4 } = require("uuid");
|
||||||
const MAX_JOBS = process.env.JOBS !== "" && process.env.JOBS !== undefined ? parseInt(process.env.JOBS) : os.cpus().length * 4; // Completely arbitrary, should usually be some multiple of your amount of cores
|
const MAX_JOBS = process.env.JOBS !== "" && process.env.JOBS !== undefined ? parseInt(process.env.JOBS) : os.cpus().length * 4; // Completely arbitrary, should usually be some multiple of your amount of cores
|
||||||
let jobAmount = 0;
|
let jobAmount = 0;
|
||||||
|
|
||||||
const acceptJob = async (uuid, sock) => {
|
const acceptJob = (uuid, sock) => {
|
||||||
jobAmount++;
|
jobAmount++;
|
||||||
queue.shift();
|
queue.shift();
|
||||||
const job = jobs.get(uuid);
|
const job = jobs.get(uuid);
|
||||||
runJob({
|
return runJob({
|
||||||
uuid: uuid,
|
uuid: uuid,
|
||||||
msg: job.msg,
|
msg: job.msg,
|
||||||
num: job.num
|
num: job.num
|
||||||
|
|
Loading…
Reference in a new issue