mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
perf: Memory optimization
This commit is contained in:
parent
c44554f4d4
commit
b8eb7b11bf
|
|
@ -94,6 +94,7 @@ class WorkFlowPostHandler:
|
|||
application_public_access_client.access_num = application_public_access_client.access_num + 1
|
||||
application_public_access_client.intraday_access_num = application_public_access_client.intraday_access_num + 1
|
||||
application_public_access_client.save()
|
||||
self.chat_info = None
|
||||
|
||||
|
||||
class NodeResult:
|
||||
|
|
|
|||
|
|
@ -272,10 +272,9 @@ class ChatInfo:
|
|||
index=chat_record_dict.get('index'), )
|
||||
|
||||
def set_cache(self):
|
||||
if self.debug:
|
||||
cache.set(Cache_Version.CHAT.get_key(key=self.chat_id), json.dumps(self.to_dict(), cls=SystemEncoder),
|
||||
version=Cache_Version.CHAT_INFO.get_version(),
|
||||
timeout=60 * 30)
|
||||
cache.set(Cache_Version.CHAT.get_key(key=self.chat_id), json.dumps(self.to_dict(), cls=SystemEncoder),
|
||||
version=Cache_Version.CHAT_INFO.get_version(),
|
||||
timeout=60 * 30)
|
||||
|
||||
@staticmethod
|
||||
def map_to_chat_info(chat_info_dict):
|
||||
|
|
|
|||
Loading…
Reference in New Issue