node-firestore-import-export
node-firestore-import-export copied to clipboard
Fixed batchExecutor to not be useless
Promise.all()
doesn't trigger the promises to start their work, creating the promise itself does. Reference:
https://stackoverflow.com/a/40639551
Currently, all batchExecutor
does is waiting for the promises in chunks, but they're still all executed in parallel. This pull request changes the code so that instead of (already running) promises, promise generator functions are passed, so that the promises are created (and actually executed) in chunks.
Another unfixed issue is that batchExecutor
is used recursively, so if the batch limit is, say, 50, and the tree depth is 3, the limit is actually 50^3=125000
since each batchExecutor
instance manages its own limit.
👍 this would be great to have!
+1
How can we make this happen?
Would be nice to solve merge conflicts
@jloosli Could you possibly give extra people write access?
@m417z and @Endran look like reasonable options as previous contributors.
@Lusitaniae done. Hopefully @jloosli will merge it soon to avoid more conflicts in the future. @jloosli is there anything preventing from merging this pull request?