You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

23m 47s logged

I faced an issue with the hosting:
The API call kept timing out.
 
First, I tried a few small tweaks including increasing the timeout and adding https to reuse existing connections rather than forming new connections with each new request.
 
But in the end, what really worked (tho I think the https helped too) was initiating the api call when the bot is started, so it can have the quote ready before you even call the command.
 
Finally, just in case, as a fallback, every time a sucessful api call happens, it updates an array so that in case the next api call isn’t successful, the previous successful call can be reused.
 
Additionally I updated my README: https://github.com/rianpatel2013-glitch/Star_Service

0
1

Comments 0

No comments yet. Be the first!