mirror of
https://github.com/tubearchivist/tubearchivist
synced 2024-11-10 01:10:31 +00:00
set relative values directly with path arg
This commit is contained in:
parent
f7f4ca7728
commit
09a94d0df5
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user