ddsnowboard / FantasyStocks

A website where you play a game of fantasy stocks.
http://fantasystocks.herokuapp.com
Apache License 2.0
0 stars 1 forks source link

Crashes on startup #3

Closed ddsnowboard closed 9 years ago

ddsnowboard commented 9 years ago

When you start up the server, the first page load queries the stock API a ton of times and makes it time out, which makes the Django server throw a weird error. This could easily happen in production if someone has a bunch of weird stocks on their page, so I need to find a way to fix it. I could either fall back to old prices, which isn't ideal but would be easy, or I could send the unknown stocks to the page with JavaScript and then query them asynchronously a little after page load, which wouldn't be impossible, could be pretty easily spaced out such that the server wouldn't get overwhelmed, and probably wouldn't slow things down.

ddsnowboard commented 9 years ago

Fixed in 2c0903cdaee256c8a55b8f8b36b381d96ab66f52. The Yahoo server is far more robust than the old one.