tardis-dev / tardis-node

Convenient access to tick-level real-time and historical cryptocurrency market data via Node.js
https://docs.tardis.dev/api/node-js
Mozilla Public License 2.0
293 stars 65 forks source link

Batch processing all or nothing #44

Closed RobinDeBaets closed 2 years ago

RobinDeBaets commented 2 years ago

https://github.com/tardis-dev/tardis-node/blob/122a49f9bbb6f6917929a9da25f50d8bc3ed842e/src/realtimefeeds/binance.ts#L42-L48

A bunch of places in the real time feeds use this pattern where Promise.all is used to process a whole batch at once. This is not ideal however, because Promise.all will immediately fail as soon as one of its promises fails. A single failed HTTP call will thus invalidate the rest.

A better solution would be to use Promise.allSettled, which does not have this behaviour.

thaaddeus commented 2 years ago

handled in v13.6.0