Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bunyan-influxdb

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bunyan-influxdb - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

55

lib/influx.js

@@ -15,18 +15,23 @@ 'use strict';

this.cargo = cargo(function (tasks, callback) {
var points = tasks.map(function (t) {
var dbs = {};
tasks.map(function (t) {
dbs[t.db] = dbs[t.db] || [];
dbs[t.db] = dbs[t.db].concat(t.points);
return t.points;
});
async.retry({
times: this.options.tries || 1,
interval: this.options.tryInterval || 3000
}, function (clbk, results) {
this.clientInflux.writePoints(tasks[0].series, points, function (err) {
if (err) {
console.error("Influxdb write error ", err);
}
clbk && clbk(err);
for(var k in dbs) {
async.retry({
times: this.options.tries || 1,
interval: this.options.tryInterval || 3000
}, function (clbk, results) {
this.clientInflux.writePoints(tasks[0].series, dbs[k], k, function (err) {
if (err) {
console.error("Influxdb write error ", err);
}
clbk && clbk(err);
}.bind(this));
}.bind(this), function (err, result) {
callback(err, result);
}.bind(this));
}.bind(this), function (err, result) {
callback(err, result);
}.bind(this));
}
}.bind(this), 500, 1000);

@@ -54,10 +59,17 @@ }

this.cargo.push({
series: series,
points: [{value: point, time: time}, tags]
}, function (err) {
//console.log('');
}
);
var cargoItem = {
series: series,
db: this.options.influx.database,
points: [{value: point, time: time}, tags]
};
if(tags && tags.appId) {
cargoItem.db = tags.appId;
delete tags.appId;
}
this.cargo.push(cargoItem, function (err) {
console.error('bunyan-influxdb ', err);
});
};

@@ -71,3 +83,2 @@

return new InfluxDBStream(options);
};
};

2

package.json
{
"name": "bunyan-influxdb",
"version": "0.2.1",
"version": "0.3.0",
"description": "Bunyan InfluxDB Stream",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc