mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 21:39:49 +00:00
add bg_save on delete option
This commit is contained in:
@@ -107,9 +107,12 @@ class RedisArchivist(RedisBase):
|
|||||||
|
|
||||||
return [self.get_message_dict(i) for i in all_matches]
|
return [self.get_message_dict(i) for i in all_matches]
|
||||||
|
|
||||||
def del_message(self, key: str) -> bool:
|
def del_message(self, key: str, save: bool = False) -> bool:
|
||||||
"""delete key from redis"""
|
"""delete key from redis"""
|
||||||
response = self.conn.execute_command("DEL", self.NAME_SPACE + key)
|
response = self.conn.execute_command("DEL", self.NAME_SPACE + key)
|
||||||
|
if save:
|
||||||
|
self.bg_save()
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user