summaryrefslogtreecommitdiff
path: root/worker.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-04-03 16:04:46 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-04-03 16:04:46 +0200
commit39b6fdccc4d628d7aa8427b52c340316a4ecbe7b (patch)
tree13e413799923265102b6f3fec2411c35ea0fb091 /worker.js
parent07ed93257129a73dd10d7aedbc77dacf739e6e77 (diff)
downloadapigrabber-39b6fdccc4d628d7aa8427b52c340316a4ecbe7b.tar.gz
apigrabber-39b6fdccc4d628d7aa8427b52c340316a4ecbe7b.zip
send data type notification to processor
Diffstat (limited to 'worker.js')
-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) {