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

Trading bug #65

Open ddsnowboard opened 7 years ago

ddsnowboard commented 7 years ago

Sometimes if you click on a stock that the Floor owns to trade it, it doesn't prepopulate the other user as floor. That's really bad.

ddsnowboard commented 7 years ago

It might have been an isolated issue with one stock. Either way, I should make the system take care of this somehow, if nothing else make an automatic function that checks through everything and makes sure it's ok.

ddsnowboard commented 7 years ago

I have a sneaking suspicion that this might take more than a 2AM solution. There's got to be a way to ensure this at the database level, and that's what I really want. I just don't know what it is. If I can figure it out, or some other good way to do it, then I'll be set. Although I could do the automatic checker now, that wouldn't be hard.

ddsnowboard commented 6 years ago

I was working on another part of the system and I came up with what I think is a solution to this. I think a big part of the problem is that there are stocks in the system that don't exist anymore, and when it comes across those, it doesn't know what to do and just stops. Now, however, I think I have a way to reload all the available stocks automatically. I just curl from this URL, cat it together, and I have all the available stocks. Then I can either just leave that in file form, or I can keep it in the database somehow. Either way, whenever we see an issue with stocks existing or not, we can just delete our file, load the new one, and hopefully that will fix it. People have questioned this part of the design before, and I think they might be right. It's probably bad. I think it can be fixed pretty easily.

Although it's possible that there is some other problem that I'm not addressing with this. I'm not sure. The fact of the matter is that this is boring and I have a fun project that I'm going to start on soon, so this won't get done first. So it goes.

EDIT: This was in reference to #59.