Fixing the Asynchronous function call problem in SteemBotAnalysis

in #utopian-io6 years ago (edited)

The issue fixed here was the lack of a way to wait for all asynchronous calls to finish, before calculating the vote counts.

The fix was to restructure how the data is retrieved and use Promise.all to wait for all promises to finish before continuing. Calculating the data didn't change, but I did make some small changes to help with performance.

I used Bluebird's Promise.map to make things a bit simpler.

The task being resolved is: https://utopian.io/utopian-io/@firedream/asynchronous-function-call-problem-in-steembotanalysis



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

Please try to be more narrative in your future contributions.

You can contact us on Discord.
[utopian-moderator]

Will do, thanks!

Hey @ms10398, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

perfect fix. Thank you
FD.

Hey @maxarias I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • This is your first accepted contribution here in Utopian. Welcome!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Congratulations @maxarias! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.030
BTC 66794.56
ETH 3501.55
USDT 1.00
SBD 2.71