From f0734bba009b7bfbdc2685d2ff63fa579956c3d3 Mon Sep 17 00:00:00 2001 From: TheEssem Date: Thu, 6 May 2021 17:40:06 -0500 Subject: [PATCH] pain, lots of pain --- api/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/index.js b/api/index.js index feae9dd..23c210a 100644 --- a/api/index.js +++ b/api/index.js @@ -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 let jobAmount = 0; -const acceptJob = async (uuid, sock) => { +const acceptJob = (uuid, sock) => { jobAmount++; queue.shift(); const job = jobs.get(uuid); - runJob({ + return runJob({ uuid: uuid, msg: job.msg, num: job.num