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

Notebook 调度成功失败需要支持IM 的通知机制 #164

Closed
ZhengshuaiPENG opened this issue Jun 29, 2022 · 1 comment
Closed

Notebook 调度成功失败需要支持IM 的通知机制 #164

ZhengshuaiPENG opened this issue Jun 29, 2022 · 1 comment
Assignees
Milestone

Comments

@ZhengshuaiPENG
Copy link
Contributor

ZhengshuaiPENG commented Jun 29, 2022

当前 Notebook 在做调度任务时,成功失败是没有主动通知机制的,希望加入一个通知机制可以当调度任务完成的时候,对任务人员进行通知。

通知的方式暂定以支持 IM 的 Webhook 机器人为主,比如飞书,企业微信,钉钉等。此类 IM 机器人是通过 HTTP URL 以及 Text 来定义消息接收方以及消息内容的。

期望:

  1. 当前用户可以通过配置文件 conf/notebook.properties 文件来定义接收方,接受消息的定制内容 text, 以及发送消息的等级。

参数设计如下:

  • notebook.scheduler.notification.webhook-url, 默认值为空,用户填写 http 的连接
  • notebook.scheduler.notification.level, 可选值 all(调度成功或失败都发送消息), failed(只有调度失败发送消息),默认值为 failed
  • notebook.scheduler.notification.message-header, 默认值为 Byzer Notebook Schedule Task Notification:,用户可自定义

消息体在调度任务执行完毕后触发,根据设置的 level (all, failed),来区分是否发送消息。 发送的消息体默认包含如下信息
image

这样一个消息体的应该显示为

Byzer Notebook Schedule Task Notification:
- Schedule Name: workload_union_to_s3
- Schedule Time: 2022-06-29 11:30:01
- Duration: 2m 8s
- Execute User: flag_prod
- Status: Success
@ZhengshuaiPENG
Copy link
Contributor Author

PR: #166

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

No branches or pull requests

2 participants