stop577611dit doesnt have the ability for batchprocessing?
Write a generator to produce paged series of your record for batching to sql:
Js doesn't support tail recursion, so you'll either need to flatten the recursion that way, or use the trampoline pattern.
Take care of edge cases though, we wouldn't want it to have a fucked up exit condition.
eval56911dFuck callbacks. Use mysql2/promise and use async await... That's like the best of both worlds (async but readable like sequential and no callback hell)
I'd never want to use JS without async await anymore. Just make sure to try catch where appropriate.
kwilliams605610dA resursive callback function like that might cause a stack overflow if the number of recursions are too high.