Skip to content

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

:art: 桌面端自动下载更新安装包 https://github.com/siyuan-note/siyuan/issues/5837

Liang Dinga7ba14324ce9
diff --git a/kernel/model/conf.go b/kernel/model/conf.go
index 49a61600a9..df83018819 100644
--- a/kernel/model/conf.go
+++ b/kernel/model/conf.go
@@ -353,9 +353,9 @@ var exitLock = sync.Mutex{}
// force:是否不执行同步过程而直接退出
// execInstallPkg:是否执行新版本安装包
//
-// 0:默认按照设置项 System.DownloadInstallPkg 检查并推送提示
-// 1:执行安装
-// 2:不执行安装
+// 0:默认按照设置项 System.DownloadInstallPkg 检查并推送提示
+// 1:不执行新版本安装
+// 2:执行新版本安装
func Close(force bool, execInstallPkg int) (exitCode int) {
exitLock.Lock()
defer exitLock.Unlock()
diff --git a/kernel/model/process.go b/kernel/model/process.go
index 4ea4a73873..65f43ac1d2 100644
--- a/kernel/model/process.go
+++ b/kernel/model/process.go
@@ -34,7 +34,7 @@ func HookResident() {
for range time.Tick(time.Second * 30) {
if 0 == util.CountSessions() {
logging.LogInfof("no active session, exit kernel process now")
- Close(false, 2)
+ Close(false, 1)
}
}
}
@@ -44,5 +44,5 @@ func HandleSignal() {
signal.Notify(c, syscall.SIGINT, syscall.SIGQUIT, syscall.SIGTERM)
s := <-c
logging.LogInfof("received os signal [%s], exit kernel process now", s)
- Close(false, 2)
+ Close(false, 1)
}