mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-27 01:05:57 +08:00
19 lines
416 B
Go
19 lines
416 B
Go
package job
|
|
|
|
import (
|
|
"github.com/1Panel-dev/1Panel/core/app/dto"
|
|
"github.com/1Panel-dev/1Panel/core/app/service"
|
|
"github.com/1Panel-dev/1Panel/core/global"
|
|
)
|
|
|
|
type script struct{}
|
|
|
|
func NewScriptJob() *script {
|
|
return &script{}
|
|
}
|
|
|
|
func (s *script) Run() {
|
|
if err := service.NewIScriptService().Sync(dto.OperateByTaskID{}); err != nil {
|
|
global.LOG.Errorf("sync scripts from remote failed, err: %v", err)
|
|
}
|
|
}
|