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

feat: 添加ITSM上下文配置功能 #1452

Closed
wants to merge 5 commits into from

Conversation

wmcowen
Copy link
Contributor

@wmcowen wmcowen commented Dec 6, 2024

No description provided.

common/utils.py Outdated
receiver_type = "list"
if isinstance(receivers, str):
receiver_type = "str"
receivers = receivers.strip().split(",")

receivers = [i for i in receivers if i not in settings.NOTICE_IGNORE_LIST]

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notice_receiver_filter(receivers):此方法建议转到 meta 实现,主要考虑可以优化 utils 与 ContextService 的调用依赖,最好是:utils 是基础,由 ContextService 调用 utils

@wmcowen wmcowen closed this Dec 9, 2024
# 接收人过滤
receivers = notice_receiver_filter(receivers)
receivers = context_service.notice_receiver_filter(receivers)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议新增【NoticeFilterService】,由此服务实现 notice_receiver_filter的功能,调用层只需要访问 NoticeFilterService 即可,不需要直接调用context_service

return []

@staticmethod
def notice_receiver_filter(receivers):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此实现与 ContextService 职责无关,与上个评论一样,建议独立处理

ticket.create_moa_ticket(state_id)

# 如果service_id不在service_approval_blacklist中,则创建moa单据
service_approval_blacklist = context_service.get_context_value_list(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同样由 notice filter service 处理

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants