summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-08-25 23:08:25 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-08-25 23:08:25 +0200
commit1d1da548bd35ee1c21a4e1658f465c35c58cebb5 (patch)
tree7b07feef361c4422394f66991435f16741e8a0e9
parentfd8237783df87e7c2410ec8b047aeebf42c1e444 (diff)
downloadreaper-1d1da548bd35ee1c21a4e1658f465c35c58cebb5.tar.gz
reaper-1d1da548bd35ee1c21a4e1658f465c35c58cebb5.zip
fix access to series namerelease/2.18.0
-rw-r--r--worker.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/worker.js b/worker.js
index 436fc52..2b3816f 100644
--- a/worker.js
+++ b/worker.js
@@ -190,11 +190,16 @@ amqp.connect(RABBITMQ_URI).then(async (rabbit) => {
} ) );
db_profiler.done("database transaction");
+ if (data.length == 0) {
+ logger.error("no data!");
+ return;
+ }
+
const es_profiler = logger.startTimer();
await elastic.bulk({
body: [].concat(... data.map((d) => [
{ index: {
- _index: `${INDEX}_${d.participant.series.name}`,
+ _index: `${INDEX}_${d["participant.series.name"]}`,
_type: INDEX,
_id: `${d.participant_api_id}@${d.start}+${d.end}`
} },