Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复bkchat渠道成功和失败多选bug #7545 #7609

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion gcloud/shortcuts/message/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ def send_task_flow_message(taskflow, msg_type, node_name=""):
taskflow, taskflow.pipeline_instance, node_name, executor
)
notify_type = notify_types.get("fail", [])
notify_info = notify_types.get("extra_info", {}).get("bkchat_groupids", {}).get("fail", "")
elif msg_type == "task_finished":
title, content, email_content = title_and_content_for_flow_finished(
taskflow, taskflow.pipeline_instance, node_name, executor
)
notify_type = notify_types.get("success", [])
notify_info = notify_types.get("extra_info", {}).get("bkchat_groupids", {}).get("success", "")
else:
return False
notify_info = notify_types.get("extra_info", {})
logger.info(
"taskflow[id={flow_id}] will send {msg_type} message({notify_type}) to: {receivers}".format(
flow_id=taskflow.id, msg_type=msg_type, notify_type=notify_type, receivers=receivers
Expand Down
2 changes: 1 addition & 1 deletion gcloud/shortcuts/message/send_msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def send(self, executor, notify_type, notify_info, receivers, title, content, em
notify_bkchat = []
for notify in notify_type:
if notify == "bk_chat":
notify_bkchat.append(notify_info.get("bkchat_groupid"))
notify_bkchat.extend(notify_info.split(","))
else:
notify_cmsi.append(notify)
if settings.ENABLE_BK_CHAT_CHANNEL and notify_bkchat:
Expand Down
Loading