mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-11 19:53:55 +08:00
优化服务监控定时器,移除notify功能包
This commit is contained in:
@@ -183,11 +183,22 @@ func (s *sSysCron) List(ctx context.Context, in *sysin.CronListInp) (list []*sys
|
||||
}
|
||||
|
||||
for _, v := range list {
|
||||
v.GroupName, _ = dao.SysCronGroup.GetName(ctx, v.GroupId)
|
||||
v.GroupName, _ = s.GetName(ctx, v.GroupId)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// GetName 获取分组名称
|
||||
func (s *sSysCron) GetName(ctx context.Context, id int64) (name string, err error) {
|
||||
m := dao.SysCronGroup.Ctx(ctx).Fields("name").Where("id", id)
|
||||
list, err := m.Value()
|
||||
if err != nil {
|
||||
err = gerror.Wrap(err, consts.ErrorORM)
|
||||
return name, err
|
||||
}
|
||||
return list.String(), nil
|
||||
}
|
||||
|
||||
// OnlineExec 在线执行
|
||||
func (s *sSysCron) OnlineExec(ctx context.Context, in *sysin.OnlineExecInp) (err error) {
|
||||
var data *entity.SysCron
|
||||
|
||||
Reference in New Issue
Block a user