1
0
Fork 0

stop triggering a cache update on page load

merge-requests/336/head
Corey Shields 2019-01-11 23:27:03 -05:00
parent 3adf7a2f35
commit 9ea72f808a
1 changed files with 9 additions and 7 deletions

View File

@ -65,14 +65,16 @@ def satellite(request, norad):
types = TRANSMITTER_TYPE
sats_cache = cache.get('stats_satellites')
if not sats_cache:
try:
cache_statistics()
except OperationalError:
pass
try:
sat_cache = sats_cache.filter(norad_cat_id=norad)
except AttributeError:
sat_cache = [{'count': 'err'}]
else:
# try:
# cache_statistics()
# except OperationalError:
# pass
try:
sat_cache = sats_cache.filter(norad_cat_id=norad)
except AttributeError:
sat_cache = [{'count': 'err'}]
try:
latest_frame = DemodData.objects.filter(satellite=satellite).order_by('-id')[0]