mirror of https://github.com/1Panel-dev/1Panel
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
469 B
21 lines
469 B
2 years ago
|
package job
|
||
|
|
||
|
import (
|
||
|
"github.com/1Panel-dev/1Panel/backend/app/service"
|
||
|
"github.com/1Panel-dev/1Panel/backend/global"
|
||
|
)
|
||
|
|
||
|
type app struct{}
|
||
|
|
||
|
func NewAppStoreJob() *app {
|
||
|
return &app{}
|
||
|
}
|
||
|
|
||
|
func (a *app) Run() {
|
||
|
global.LOG.Info("AppStore scheduled task in progress ...")
|
||
|
if err := service.NewIAppService().SyncAppListFromRemote(); err != nil {
|
||
|
global.LOG.Errorf("AppStore sync failed %s", err.Error())
|
||
|
}
|
||
|
global.LOG.Info("AppStore scheduled task has completed")
|
||
|
}
|