mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-08 02:40:32 +08:00
优化系统goroutine使用,减少goroutine数量,增加goman查看goroutine数量指令
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/nodeconfigs"
|
||||
teaconst "github.com/TeaOSLab/EdgeNode/internal/const"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/events"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/goman"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/remotelogs"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/utils"
|
||||
"github.com/iwind/TeaGo/maps"
|
||||
@@ -96,10 +97,10 @@ func (this *SystemServiceManager) setupSystemd(params maps.Map) error {
|
||||
}
|
||||
|
||||
// 启动Service
|
||||
go func() {
|
||||
goman.New(func() {
|
||||
time.Sleep(5 * time.Second)
|
||||
_ = exec.Command(systemctl, "start", teaconst.SystemdServiceName).Start()
|
||||
}()
|
||||
})
|
||||
|
||||
if output == "enabled" {
|
||||
// 检查文件路径是否变化
|
||||
|
||||
Reference in New Issue
Block a user