summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--worker.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/worker.js b/worker.js
index 44e85c5..adf415c 100644
--- a/worker.js
+++ b/worker.js
@@ -42,8 +42,9 @@ if (MADGLORY_TOKEN == undefined) throw "Need an API token";
matches = jsonapi.parse(data);
// send match structure
await Promise.all(matches
- .map(async (match) => await ch.sendToQueue("process",
- new Buffer(JSON.stringify(match)), { persistent: true })
+ .map((match) => ch.sendToQueue("process",
+ new Buffer(JSON.stringify(match)),
+ { persistent: true, type: "match" })
));
if (matches.length < 50) exhausted = true;
} catch (err) {