Merge pull request #12316 from rainzm/notify/better

Notify Bug Fixes
This commit is contained in:
Zexi Li
2021-09-29 14:51:23 +08:00
committed by GitHub
15 changed files with 191 additions and 152 deletions
+2 -1
View File
@@ -134,7 +134,7 @@ func NotifyRobot(robotIds []string, priority npk.TNotifyPriority, event string,
// NotifyRobot will send messages via all robot contact type such as dingtalk-robot.
func NotifyRobotWithCtx(ctx context.Context, robotIds []string, priority npk.TNotifyPriority, event string, data jsonutils.JSONObject) error {
rawNotify(context.Background(), sNotifyParams{
rawNotify(ctx, sNotifyParams{
robots: robotIds,
channel: npk.NotifyByRobot,
priority: priority,
@@ -284,6 +284,7 @@ func EventNotify(ctx context.Context, userCred mcclient.TokenCredential, ep SEve
ResourceDetails: objDetails,
Event: event.String(),
AdvanceDays: ep.AdvanceDays,
Priority: string(npk.NotifyPriorityNormal),
ProjectId: projectId,
ProjectDomainId: projectDomainId,
}