mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-28 05:15:04 +08:00
style: 启动1panel,自动同步应用
This commit is contained in:
parent
d8971b05c1
commit
c111290609
13
backend/init/business/business.go
Normal file
13
backend/init/business/business.go
Normal file
@ -0,0 +1,13 @@
|
||||
package business
|
||||
|
||||
import (
|
||||
"github.com/1Panel-dev/1Panel/backend/app/service"
|
||||
"github.com/1Panel-dev/1Panel/backend/global"
|
||||
)
|
||||
|
||||
func Init() {
|
||||
appService := service.AppService{}
|
||||
if err := appService.SyncAppList(); err != nil {
|
||||
global.LOG.Errorf("sync app error: %s", err.Error())
|
||||
}
|
||||
}
|
@ -4,6 +4,7 @@ import (
|
||||
"encoding/gob"
|
||||
"fmt"
|
||||
"github.com/1Panel-dev/1Panel/backend/init/app"
|
||||
"github.com/1Panel-dev/1Panel/backend/init/business"
|
||||
"time"
|
||||
|
||||
"github.com/1Panel-dev/1Panel/backend/cron"
|
||||
@ -35,6 +36,7 @@ func Start() {
|
||||
session.Init()
|
||||
gin.SetMode(global.CONF.System.Level)
|
||||
cron.Run()
|
||||
business.Init()
|
||||
|
||||
rootRouter := router.Routers()
|
||||
address := fmt.Sprintf(":%d", global.CONF.System.Port)
|
||||
|
Loading…
Reference in New Issue
Block a user