DEV Community

Discussion on: JS Promises: race vs all vs allSettled

Collapse
 
mhnpd profile image
Mohan Upadhyay • Edited

Great post. Recently I was stuck on a problem where I want to download multiple files (specially videos) from s3 using aws-sdk for JS. It's on election app. Basically all the data required to download content will be receive from a queue which is implement using rabbitmq. Now when I receive new object from queue I want to cancel all the pending promises and download request (xhr request). It there any suggestions for such cases. I am not still able to figure out proper solution for this though consultant in a lot of places.