From fa89f6febacc25a69a7fc1e7f93a47fdc8f7c239 Mon Sep 17 00:00:00 2001 From: soulgalore Date: Tue, 27 Nov 2018 21:15:03 +0100 Subject: [PATCH] fix bluebird dependency --- lib/plugins/influxdb/sender.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/plugins/influxdb/sender.js b/lib/plugins/influxdb/sender.js index f724cd322..082e8aee7 100644 --- a/lib/plugins/influxdb/sender.js +++ b/lib/plugins/influxdb/sender.js @@ -15,15 +15,15 @@ class InfluxDBSender { } send(data) { - return Promise.resolve(data) - .map(point => { - return { - tags: point.tags, - measurement: point.seriesName, - fields: point.point - }; - }) - .then(points => this.client.writePoints(points)); + const points = []; + for (let point of data) { + points.push({ + tags: point.tags, + measurement: point.seriesName, + fields: point.point + }); + } + return this.client.writePoints(points); } }