♻️ 重构部分代码,打印调试信息

This commit is contained in:
naiba
2021-04-20 19:30:34 +08:00
parent d3c3e55c88
commit 6286e34af0
7 changed files with 70 additions and 38 deletions

View File

@@ -21,7 +21,10 @@ func (s *NezhaHandler) ReportTask(c context.Context, r *pb.TaskResult) (*pb.Rece
return nil, err
}
if r.GetType() != model.TaskTypeCommand {
dao.ServiceSentinelShared.Dispatch(r)
dao.ServiceSentinelShared.Dispatch(dao.ReportData{
Data: r,
Reporter: clientID,
})
} else {
// 处理上报的计划任务
dao.CronLock.RLock()