I hereby claim:
- I am evancauwenberg on github.
- I am evancauwenberg (https://keybase.io/evancauwenberg) on keybase.
- I have a public key ASCzpv8YmWy5nujDdH0kvpgB5aI7l6NG7nKzK_5prPrjEAo
To claim this, I am signing this object:
| _read() { | |
| // // List all xml tags that have more than one child. | |
| this.xmlStream.collect('title'); | |
| // // catch error | |
| // this.xmlStream.on('error', console.log); | |
| this.xmlStream.on(`updateElement: ${this.elementToExtract}`, (updateElement) => { | |
| this.push(updateElement); | |
| }); |
| var date = new Date(); | |
| var daysToDeletion = 120; | |
| var deletionDate = new Date(date.setDate(date.getDate() - daysToDeletion)); | |
| printjson(deletionDate); | |
| var db = db.getSiblingDB('db') | |
| db.getMongo().setSlaveOk(); | |
| printjson(db.messages.find({insertDate : {$lt : deletionDate}}).count()); |
I hereby claim:
To claim this, I am signing this object:
| const path = require('path'); | |
| const fs = require('fs'); | |
| const { Transform } = require('stream'); | |
| const csv = require('fast-csv'); | |
| class PersistStream extends Transform { | |
| constructor(args) { | |
| super({ objectMode: true, ...(args || {}) }); | |
| this.batchSize = 100; | |
| this.batch = []; |