summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-10-28 12:27:47 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-10-28 12:27:47 +0100
commit656064100a4ec06296b0be6cd6ac0b8c6c6cec73 (patch)
tree8cd8a5335a2ecbb8173c0565f267a4c0fc6c4d92 /ishtar_common
parent40c22649a813ace2ac1e64c67456028827306d54 (diff)
downloadIshtar-656064100a4ec06296b0be6cd6ac0b8c6c6cec73.tar.bz2
Ishtar-656064100a4ec06296b0be6cd6ac0b8c6c6cec73.zip
Tasks - stats: fix cache request
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/models.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 7e62417ac..945a48ea8 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -3204,9 +3204,6 @@ def update_stats(statscache, item, funcname):
return current_values
now = datetime.datetime.now()
- if statscache.update_requested and (
- statscache.update_requested + datetime.timedelta(hours=12) > now):
- return statscache.values
app_name = item._meta.app_label
model_name = item._meta.model_name
statscache.update_requested = now.isoformat()
@@ -3236,9 +3233,6 @@ def _update_stats(app, model, model_pk, funcname):
sc.update_requested = None
sc.updated = datetime.datetime.now()
sc.save()
- StatsCache.objects.get_or_create(
- model=model_name, model_pk=model_pk
- )
class DashboardFormItem(object):