We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Promise resolves successfully and invokes the callback passed to .then()
.then()
Uncaught exception thrown and callback never executed:
node_modules/influx/lib/src/pool.js:154 output += str.toString(); ^ RangeError: Invalid string length
const Influx = require('influx'); const influx = new Influx.InfluxDB({ host: '127.0.0.1', database: 'bigdb', username: 'influxuser', password: '*****', schema: [{ 'measurement': 'stats', fields: { children: Influx.FieldType.INTEGER }, tags: [ 'host', 'reg', 'vl' ] }] }); const dateFrom = new Date(); dateFrom.setUTCHours(0, 0, 0, 0); dateFrom.setUTCDate(dateFrom.getUTCDate()-1); const dateTo = new Date(dateFrom); dateTo.setUTCHours(23, 59, 59, 0); influx.query(`SELECT * FROM "stats" WHERE time > '${dateFrom.toISOString()}' AND time < '${dateTo.toISOString()}'`).then( (results) => { const output = fs.createWriteStream('test.csv.gz'); const compressor = zlib.createGzip(); compressor.pipe(output); results.forEach( (row) => { compressor.write(`stats,"host=${row.host},reg=${row.reg},vl=${row.vl}",${row.time.toISOString()},${row.children},${row.reg},${row.host}\n`); }); compressor.end(); }); // ...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected Behavior
Promise resolves successfully and invokes the callback passed to
.then()
Actual Behavior
Uncaught exception thrown and callback never executed:
Steps/Code to Reproduce the Problem
Specifications
The text was updated successfully, but these errors were encountered: