mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/1Panel-dev/1Panel.git
synced 2026-09-20 08:03:55 +08:00
feat: disable script library auto-sync on startup (#13047)
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
package run
|
||||
|
||||
import (
|
||||
"github.com/1Panel-dev/1Panel/core/app/dto"
|
||||
"github.com/1Panel-dev/1Panel/core/app/repo"
|
||||
"github.com/1Panel-dev/1Panel/core/app/service"
|
||||
"github.com/1Panel-dev/1Panel/core/constant"
|
||||
"github.com/1Panel-dev/1Panel/core/global"
|
||||
)
|
||||
|
||||
func Init() {
|
||||
scriptSync, _ := repo.NewISettingRepo().GetValueByKey("ScriptSync")
|
||||
if !global.CONF.Base.IsOffline && scriptSync == constant.StatusEnable {
|
||||
if err := service.NewIScriptService().Sync(dto.OperateByTaskID{}); err != nil {
|
||||
global.LOG.Errorf("sync scripts from remote failed, err: %v", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,6 @@ import (
|
||||
"github.com/1Panel-dev/1Panel/core/init/log"
|
||||
"github.com/1Panel-dev/1Panel/core/init/migration"
|
||||
"github.com/1Panel-dev/1Panel/core/init/proxy"
|
||||
"github.com/1Panel-dev/1Panel/core/init/run"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/soheilhy/cmux"
|
||||
|
||||
@@ -50,7 +49,6 @@ func Start() {
|
||||
hook.Init()
|
||||
InitOthers()
|
||||
|
||||
run.Init()
|
||||
proxy.Init()
|
||||
|
||||
rootRouter := router.Routers()
|
||||
|
||||
Reference in New Issue
Block a user