Skip to content

Commit b8eb7b1

Browse files
committed
perf: Memory optimization
1 parent c44554f commit b8eb7b1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

apps/application/flow/i_step_node.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def handler(self, workflow):
9494
application_public_access_client.access_num = application_public_access_client.access_num + 1
9595
application_public_access_client.intraday_access_num = application_public_access_client.intraday_access_num + 1
9696
application_public_access_client.save()
97+
self.chat_info = None
9798

9899

99100
class NodeResult:

apps/application/serializers/common.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,9 @@ def map_to_chat_record(chat_record_dict):
272272
index=chat_record_dict.get('index'), )
273273

274274
def set_cache(self):
275-
if self.debug:
276-
cache.set(Cache_Version.CHAT.get_key(key=self.chat_id), json.dumps(self.to_dict(), cls=SystemEncoder),
277-
version=Cache_Version.CHAT_INFO.get_version(),
278-
timeout=60 * 30)
275+
cache.set(Cache_Version.CHAT.get_key(key=self.chat_id), json.dumps(self.to_dict(), cls=SystemEncoder),
276+
version=Cache_Version.CHAT_INFO.get_version(),
277+
timeout=60 * 30)
279278

280279
@staticmethod
281280
def map_to_chat_info(chat_info_dict):

0 commit comments

Comments
 (0)