Skip to content

Commit

Permalink
修改工单执行结束的通知对象
Browse files Browse the repository at this point in the history
  • Loading branch information
hhyo committed Nov 19, 2018
1 parent 6bab806 commit 019c75f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sql/utils/execute_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,9 @@ def send_msg(workflow_detail, url):
re.sub('[\r\n\f]{2,}', '\n', workflow_detail.sql_content[0:500].replace('\r', '')))

if sys_config.get('mail'):
# 邮件通知申请人,审核人,抄送DBA
notify_users = workflow_detail.audit_auth_groups.split(',')
notify_users.append(workflow_detail.engineer)
list_to_addr = [email['email'] for email in Users.objects.filter(username__in=notify_users).values('email')]
# 邮件通知申请人,抄送DBA
list_to_addr = [email['email'] for email in
Users.objects.filter(username=workflow_detail.engineer).values('email')]
list_cc_addr = [email['email'] for email in
auth_group_users(auth_group_names=['DBA'], group_id=workflow_detail.group_id).values('email')]
mail_sender.send_email(msg_title, msg_content, list_to_addr, list_cc_addr=list_cc_addr)
Expand Down

0 comments on commit 019c75f

Please sign in to comment.