summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-11-04 16:33:57 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-07-08 09:58:49 +0200
commit43c739381934da2f68a0b9b471361aca62b97bab (patch)
tree3101d5ebb242fd65ce0259ead4526ff045311bc6
parentb97cceab25f6d5a5b12dcf6a40f4a4775ebeea5d (diff)
downloadIshtar-43c739381934da2f68a0b9b471361aca62b97bab.tar.bz2
Ishtar-43c739381934da2f68a0b9b471361aca62b97bab.zip
Fix revoke old task
-rw-r--r--CHANGES-DEV.md1
-rw-r--r--ishtar_common/utils.py4
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGES-DEV.md b/CHANGES-DEV.md
index 5d983f6c6..ae493c8fb 100644
--- a/CHANGES-DEV.md
+++ b/CHANGES-DEV.md
@@ -2,6 +2,7 @@ Ishtar changelog
================
### Features ###
+- Performance: revoke cascade task
- JSON types: multi valued choices
- Forms:
- context record: change field order
diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py
index 77748143c..0e363ca55 100644
--- a/ishtar_common/utils.py
+++ b/ishtar_common/utils.py
@@ -484,7 +484,9 @@ def cached_label_and_geo_changed(sender, **kwargs):
def revoke_old_task(kwargs, action_name, task_id, instance_cls):
kwargs["action"] = action_name
- key, old_task_id = get_cache(instance_cls, kwargs)
+ key, old_task_id = get_cache(
+ instance_cls, tuple(f"{k}:{v}" for k, v in kwargs.items())
+ )
if old_task_id:
try:
celery_app.control.revoke(old_task_id)