in src/connectors/gremlin-connector.ts [102:120]
private addToGraph(type: Etype, arr: Vertex[] | Edge[], callback: any) {
const timer = process.hrtime();
const retryableIterator = this.getRetryable(
this.vertexEdgeIterator.bind(this)
);
async.eachOfLimit(
arr as Vertex[] & Edge[],
this.batchSize,
(value, key, cb) => {
retryableIterator(type, value, (err: any) => {
cb(err);
});
},
err => {
callback(err);
}
);
}