set relative values directly with path arg

This commit is contained in:
simon 2022-06-15 10:27:29 +07:00
parent f7f4ca7728
commit 09a94d0df5
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -34,10 +34,10 @@ class RedisArchivist(RedisBase):
"setting",
]
def set_message(self, key, message, expire=True):
def set_message(self, key, message, path=".", expire=True):
"""write new message to redis"""
self.conn.execute_command(
"JSON.SET", self.NAME_SPACE + key, ".", json.dumps(message)
"JSON.SET", self.NAME_SPACE + key, path, json.dumps(message)
)
if expire: