mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-12-11 14:59:01 +08:00
25 lines
513 B
Go
25 lines
513 B
Go
package business
|
|
|
|
import (
|
|
"github.com/1Panel-dev/1Panel/backend/app/service"
|
|
"github.com/1Panel-dev/1Panel/backend/global"
|
|
)
|
|
|
|
func Init() {
|
|
go syncApp()
|
|
go syncInstalledApp()
|
|
}
|
|
|
|
func syncApp() {
|
|
if err := service.NewIAppService().SyncAppListFromRemote(); err != nil {
|
|
global.LOG.Errorf("App Store synchronization failed")
|
|
return
|
|
}
|
|
}
|
|
|
|
func syncInstalledApp() {
|
|
if err := service.NewIAppInstalledService().SyncAll(true); err != nil {
|
|
global.LOG.Errorf("sync instaled app error: %s", err.Error())
|
|
}
|
|
}
|