replace parallel-transform with pipeline-pipe #321
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
👋 I did some awesome work for the Pelias project and would love for everyone to have a look at it and provide feedback.
Here's the reason for this change 🚀
Hey, I've noticed that the
adminLookup
stream doesn't end with the end of pbf parser and found an [https://github.com/mafintosh/parallel-transform/issues/4](untucked issue in the parallel-transform module). Someone came up with the solution by creating new module pipeline-pipe with slightly different syntax, but solving the same problem.I've update dependency and tested with my local setup, I hope this would be helpful for you as well.
Here's what actually got changed 👏
Replace
parallel-transform
dependency withpipeline-pipe
and converted callback-based transform function insidelookupStream
with promise-based.Here's how others can test the changes 👀
Now, you can handle end of the stream in
pelias-openstreetmap
module:In my case I'm not using Elasticsearch (and
pelias-dbclient
) and import data into different source after extraction/mapping.