Open tadjik1 opened 2 months ago
Hi @tadjik1 thanks for the PR.
I'm trying to understand better, the issue you linked seems to suggest that the end
event is emitted correctly at the end, but the finish
event is emitted too early.
In your example you have .on('end', () => console.log('ended'))
, didn't this always work?
Is the problem with finish
or end
?
:wave: 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 :rocket:
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 :clap:
Replace
parallel-transform
dependency withpipeline-pipe
and converted callback-based transform function insidelookupStream
with promise-based.Here's how others can test the changes :eyes:
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.