diff options
Diffstat (limited to 'ishtar_common/utils.py')
-rw-r--r-- | ishtar_common/utils.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py index 4e5259001..9bd81383f 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -376,7 +376,8 @@ def cached_label_changed(sender, **kwargs): cache_key, value = get_cache( sender, ["cached_label_changed", kwargs['instance'].pk] ) - if value: # multiple request too quick + if value and not settings.DISABLE_TASK_TIMEOUT: + # multiple request too quick return cache.set(cache_key, True, settings.CACHE_TASK_TIMEOUT) @@ -590,7 +591,8 @@ def post_save_geo(sender, **kwargs): return cache_key, value = get_cache( sender, ["post_save_geo", kwargs['instance'].pk]) - if value: # multiple request too quick + if value and not settings.DISABLE_TASK_TIMEOUT: + # multiple request too quick return cache.set(cache_key, True, settings.CACHE_TASK_TIMEOUT) |