1Panel/agent/cron/job/app.go

21 lines
465 B
Go
Raw Normal View History

2024-07-23 14:48:37 +08:00
package job
import (
"github.com/1Panel-dev/1Panel/agent/app/service"
"github.com/1Panel-dev/1Panel/agent/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")
}