Arcana / dotabank-web

dotabank.com
8 stars 6 forks source link

Leagues listing "You have an error in your SQL syntax; check the manu..." #2

Closed rjackson closed 10 years ago

rjackson commented 10 years ago

https://app.getsentry.com/arcanaio/dotabank/group/21876480/

Not sure what the problem is, we haven't changed this recently?

Smashman commented 10 years ago

It looks like league_id_csv is blank, meaning that there's nothing going into the in() filter. So it's not a syntax error per se, but it says it is because you've been lazy and constructed it with .format

Smashman commented 10 years ago

I'm not sure why league_id_csv is not returning anything, however. I'd need to whack open PyCharm later tonight to dig in.

rjackson commented 10 years ago

Bollocks. We've got a log entry saying "League.get_all returned with HTTPError" (http://dotabank.com/admin/logs/view/2610), which means our fs_cache is then caching an empty list.

That cached list should only last 1 hour however, so it should've expired and fetched new data by now. Evidently that isn't the case.

The fact we cached an empty list is probably a problem in of itself - I think we'll have to investigate having manually pulling that (expired) data from the cache and serving it up again. Hopefully the filesystem cache code doesn't simply delete expired data - so we will still be able to retrieve valid data.

And yeah, we should add a check for league_id_csv's length and not run the query if it is empty.

Smashman commented 10 years ago

:+1: