From 62e74ed29272fd026c75c78337b100ef07062373 Mon Sep 17 00:00:00 2001 From: simon987 Date: Thu, 27 Jan 2022 11:06:52 -0500 Subject: [PATCH] Make sure that _id field is present in redis MQ --- hexlib/mq.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hexlib/mq.py b/hexlib/mq.py index d4ea439..7a4d12c 100644 --- a/hexlib/mq.py +++ b/hexlib/mq.py @@ -120,7 +120,7 @@ class RedisMQ(MessageQueue): task_json = orjson.loads(task) topic = topic.decode() - if "_id" not in task_json: + if "_id" not in task_json or not task_json["_id"]: raise ValueError(f"Task doesn't have _id field: {task}") # Immediately put in pending queue diff --git a/setup.py b/setup.py index a90e26f..85b771f 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup setup( name="hexlib", - version="1.71", + version="1.72", description="Misc utility methods", author="simon987", author_email="me@simon987.net",