How to use the batch function from highland

Find comprehensive JavaScript highland.batch code examples handpicked from public code repositorys.

172
173
174
175
176
177
178
179
180
181
        return data;
}),

// * batch for # of items
// @ts-ignore
_.batch(config.recordsPerBatch),

// * batch for req size
// @ts-ignore
_.consume(chunkForSize(config)),
fork icon0
star icon13
watch icon0

+ 3 other calls in file

201
202
203
204
205
206
207
208
209
210
    _h.compact()
  );
};

return _h.pipeline(
  _h.batch(_this.batchSize),
  _h.flatMap(_h.wrapCallback(function(doc, callback) {
    _this.rl.getTokens(_this.quotaSize * _this.batchSize, () => callback(null, doc));
  })),
  _h.map(mapToMultipartRequest),
fork icon2
star icon8
watch icon3

+ 3 other calls in file

12
13
14
15
16
17
18
19
20
21
22


const batchWrite = ({
  TableName, batch, parallel = 1,
}) => __.pipeline(
  __.map(wrapPutRequest),
  __.batch(batch),
  __.map(defaultDocumentClient.wrapBatchWriteRequest(TableName)),
  __.map(batch => defaultDocumentClient.batchWrite(batch)),
  __.map(__),
  __.parallel(parallel) // TODO fix lint rules, we want a comma here.
fork icon0
star icon1
watch icon0

+ 2 other calls in file