session can be gone

This commit is contained in:
j 2017-08-04 18:11:51 +02:00
parent b991a3c381
commit 110c57d726

View file

@ -36,7 +36,10 @@ def update_statistics():
@task(ignore_results=True, queue='default') @task(ignore_results=True, queue='default')
def parse_data(key): def parse_data(key):
from . import models from . import models
try:
session_data = models.SessionData.objects.get(session_key=key) session_data = models.SessionData.objects.get(session_key=key)
except models.SessionData.DoesNotExist:
return
session_data.parse_data() session_data.parse_data()
session_data.save() session_data.save()