Closed shannonrothe closed 3 years ago
I don't think Puppeteer can handle a load like this. I think you need to use https://github.com/sindresorhus/p-all with a concurrency of maybe "number of CPUs * 2". Needs to be tested what gives the output performance.
@sindresorhus no problem, I might look into this a bit more when I get a chance 👍
Friendly bump :)
@sindresorhus still failing tests, not sure what the issue is with p-all
😕 Please check my changes and let me know how we can best approach 👍🏼
You are using p-all
incorrectly, which the error also points out.
It might be better to use p-map
since you're mapping this.sizes
.
It might be better to use
p-map
since you're mappingthis.sizes
.
Done, should be okay now 👌🏼
Thanks :)
Noticed the comment so utilised
Promise.all()
to add concurrency to image creation 👍🏼