fix bluebird dependency
This commit is contained in:
parent
a929432f05
commit
fa89f6feba
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue