fix: Ruff

This commit is contained in:
墨梓柒
2025-05-05 01:29:07 +08:00
parent 2115917580
commit 1da2b4ca70

View File

@@ -176,7 +176,7 @@ class SubHeartflowManager:
def get_inactive_subheartflows(self, max_age_seconds=INACTIVE_THRESHOLD_SECONDS): def get_inactive_subheartflows(self, max_age_seconds=INACTIVE_THRESHOLD_SECONDS):
"""识别并返回需要清理的不活跃(处于ABSENT状态超过一小时)子心流(id, 原因)""" """识别并返回需要清理的不活跃(处于ABSENT状态超过一小时)子心流(id, 原因)"""
current_time = time.time() _current_time = time.time()
flows_to_stop = [] flows_to_stop = []
for subheartflow_id, subheartflow in list(self.subheartflows.items()): for subheartflow_id, subheartflow in list(self.subheartflows.items()):
@@ -184,7 +184,7 @@ class SubHeartflowManager:
if state != ChatState.ABSENT: if state != ChatState.ABSENT:
continue continue
subheartflow.update_last_chat_state_time() subheartflow.update_last_chat_state_time()
absent_last_time = subheartflow.chat_state_last_time _absent_last_time = subheartflow.chat_state_last_time
flows_to_stop.append(subheartflow_id) flows_to_stop.append(subheartflow_id)
return flows_to_stop return flows_to_stop