-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate restore script to promises #32
base: master
Are you sure you want to change the base?
Conversation
@yegor256 please, pay attention to this pull request |
Job |
@rultor merge |
@dusterio @yegor256 Oops, I failed. You can see the full log here (spent 2min)
|
Weird - it runs just fine for me (both npm install and npm test) but it fails on Travis. How/where is stuff like LevelUp, LevelDB, etc are used? It's some pretty heavy stuff for such a tiny tool :) |
@dusterio are you planning to finish this? |
@0crat out |
@dusterio what is the story here? Are you going to finish? |
@dusterio let's finish this? |
Tested on a table with 100,000 entries
Migrated to promises and ES6 syntax because it's supported in Node
The new logic is like this:
Every line of the standard input creates one promise (an insert task), then these promises are grouped in batches depending on Writing Capacity. Eg. if there are 50 writing units, there will be 50 launched promises in parallel. Then, batches will run one after another in series that will allow to introduce delays.