Compare commits
10 Commits
0ec606cdaa
...
213f174ffe
| Author | SHA1 | Date | |
|---|---|---|---|
| 213f174ffe | |||
| cf4ce1081d | |||
| 168c1f0f65 | |||
| e922ab38bd | |||
| 94a5b50247 | |||
| 05ae13c147 | |||
| 86663e072e | |||
| 4f11d78f37 | |||
| 60583a27b2 | |||
| d438ba86c6 |
@ -271,24 +271,18 @@ class ChatDB(Chat):
|
||||
self.messages += new_messages
|
||||
self.sort()
|
||||
|
||||
def write_db(self, msgs: Optional[list[Message]] = None) -> None:
|
||||
def write_db(self) -> None:
|
||||
"""
|
||||
Write messages to the DB directory. If a message has no file_path, a new one
|
||||
will be created. If message.file_path exists, it will be modified to point
|
||||
to the DB directory.
|
||||
Write all messages to the DB directory. If a message has no file_path,
|
||||
a new one will be created. If message.file_path exists, it will be modified
|
||||
to point to the DB directory.
|
||||
"""
|
||||
write_dir(self.db_path,
|
||||
msgs if msgs else self.messages,
|
||||
self.file_suffix,
|
||||
self.get_next_fid)
|
||||
write_dir(self.db_path, self.messages, self.file_suffix, self.get_next_fid)
|
||||
|
||||
def write_cache(self, msgs: Optional[list[Message]] = None) -> None:
|
||||
def write_cache(self) -> None:
|
||||
"""
|
||||
Write messages to the cache directory. If a message has no file_path, a new one
|
||||
will be created. If message.file_path exists, it will be modified to point to
|
||||
the cache directory.
|
||||
Write all messages to the cache directory. If a message has no file_path,
|
||||
a new one will be created. If message.file_path exists, it will be modified
|
||||
to point to the cache directory.
|
||||
"""
|
||||
write_dir(self.cache_path,
|
||||
msgs if msgs else self.messages,
|
||||
self.file_suffix,
|
||||
self.get_next_fid)
|
||||
write_dir(self.cache_path, self.messages, self.file_suffix, self.get_next_fid)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user