diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-11-04 16:33:57 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-11-16 17:04:41 +0100 |
commit | 426b3a89830e3e923b0510361dedc48f2a34bf81 (patch) | |
tree | 979f53291d7266ab87870e34cbef06d9613aa59a | |
parent | 3e4a009c4be2d85d4443d59706ddf4ee9671b204 (diff) | |
download | Ishtar-426b3a89830e3e923b0510361dedc48f2a34bf81.tar.bz2 Ishtar-426b3a89830e3e923b0510361dedc48f2a34bf81.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 a82a56f79..47fd3bad6 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -483,7 +483,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) |