From 169e22bb1b756f3457e1f2d1655940306a5ff09f Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 28 Oct 2019 12:27:47 +0100 Subject: Tasks - stats: fix cache request --- ishtar_common/models.py | 6 ------ 1 file changed, 6 deletions(-) (limited to 'ishtar_common') 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): -- cgit v1.2.3