This commit is contained in:
孟帅
2023-11-25 18:36:11 +08:00
parent 40117c700d
commit 70e9f966c3
142 changed files with 5407 additions and 2058 deletions

View File

@@ -66,10 +66,11 @@ func (s *sCronClient) Start(ctx context.Context) {
// 注册RPC路由
s.client.RegisterRPCRouter(
s.OnCronDelete, // 删除任务
s.OnCronEdit, // 编辑任务
s.OnCronStatus, // 修改任务状态
s.OnCronOnlineExec, // 执行一次任务
s.OnCronDelete, // 删除任务
s.OnCronEdit, // 编辑任务
s.OnCronStatus, // 修改任务状态
s.OnCronOnlineExec, // 执行一次任务
s.OnCronDispatchLog, // 查看调度日志
)
// 注册拦截器

View File

@@ -34,3 +34,10 @@ func (s *sCronClient) OnCronOnlineExec(ctx context.Context, req *servmsg.CronOnl
err = service.SysCron().OnlineExec(ctx, req.OnlineExecInp)
return
}
// OnCronDispatchLog 查看调度日志
func (s *sCronClient) OnCronDispatchLog(ctx context.Context, req *servmsg.CronDispatchLogReq) (res *servmsg.CronDispatchLogRes, err error) {
res = new(servmsg.CronDispatchLogRes)
res.DispatchLogModel, err = service.SysCron().DispatchLog(ctx, req.DispatchLogInp)
return
}