mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 23:39:18 +00:00
set relative values directly with path arg
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user