diff options
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 |
commit | 06315a89ee494f48d003853145ba36b0a9596dde (patch) | |
tree | 3101d5ebb242fd65ce0259ead4526ff045311bc6 | |
parent | cc353cb9354fc27e3a4d02e91d9eae66a01208ce (diff) | |
download | Ishtar-06315a89ee494f48d003853145ba36b0a9596dde.tar.bz2 Ishtar-06315a89ee494f48d003853145ba36b0a9596dde.zip |
Fix revoke old task
-rw-r--r-- | CHANGES-DEV.md | 1 | ||||
-rw-r--r-- | ishtar_common/utils.py | 4 |
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) |