diff --git a/karton/core/backend.py b/karton/core/backend.py index b235c0d..3045b9d 100644 --- a/karton/core/backend.py +++ b/karton/core/backend.py @@ -544,6 +544,10 @@ def register_tasks(self, tasks: List[Task]) -> None: Register or update multiple tasks in Redis. :param tasks: List of task objects """ + # calling mset with an empty dictionary results in a crash + if not tasks: + return + taskmap = { f"{KARTON_TASK_NAMESPACE}:{task.uid}": task.serialize() for task in tasks }