You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at it, the main example are not the best. I think I'll write a better one.
This module will not handle multiple streams. The main purpose of this module is to take a stream where each event in the stream are an object and buffer these up into a batch of objects.
Example; CouchDB has a feature where one can write multiple documents (JSON) in batches. Its much faster to POST ex 100 documents in one batch to CouchDB than posting 100 documents one by one. If you have stream of documents you want to post to CouchDB you can then use this module to buffer up documents and send them in batches to CouchDB. The code will look something like this (not a fully working example, but thats the outline):
Hi, I would like to try this library, but I am failing to understand how to propagate multiple write streams.
The example:
will write multiple arrays to the same file
batchedObjects.json
causing it to be an invalid JSON file.Would it be possible to create an example with multiple write streams? I don't see anywhere in batch.js that retains a record of the number batches.
The text was updated successfully, but these errors were encountered: