Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:recycle: kernel/sql/queue_history: refactor time.Now().Sub with time.Since (#17277)

iliya322477e2828d
diff --git a/kernel/sql/queue_history.go b/kernel/sql/queue_history.go
index a9871fc637..a19166bb21 100644
--- a/kernel/sql/queue_history.go
+++ b/kernel/sql/queue_history.go
@@ -113,7 +113,7 @@ func FlushHistoryQueue() {
debug.FreeOSMemory()
}
- elapsed := time.Now().Sub(start).Milliseconds()
+ elapsed := time.Since(start).Milliseconds()
if 7000 < elapsed {
logging.LogInfof("database history op tx [%dms]", elapsed)
}