fix: 2.5.0

1.修复邮箱编辑异常
2.修复任务执行失败重复发送问题
This commit is contained in:
byteblogs168 2023-12-08 14:14:54 +08:00
parent 5734525658
commit cff21e32a2
6 changed files with 48 additions and 12 deletions

4
.gitignore vendored
View File

@ -1,5 +1,5 @@
HELP.md HELP.md
/target/ target/
!.mvn/wrapper/maven-wrapper.jar !.mvn/wrapper/maven-wrapper.jar
### STS ### ### STS ###
@ -30,3 +30,5 @@ HELP.md
# Maven ignore # Maven ignore
.flattened-pom.xml .flattened-pom.xml
data/

32
easy-retry-server/.gitignore vendored Normal file
View File

@ -0,0 +1,32 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
/build/
### VS Code ###
.vscode/
# Maven ignore
.flattened-pom.xml

View File

@ -80,7 +80,7 @@ public class JobTaskFailAlarmListener extends AbstractJobAlarm<JobTaskFailAlarmE
@Override @Override
protected AlarmContext buildAlarmContext(JobAlarmInfo alarmDTO, NotifyConfigInfo notifyConfig) { protected AlarmContext buildAlarmContext(JobAlarmInfo alarmDTO, NotifyConfigInfo notifyConfig) {
// 预警 // 预警
AlarmContext context = AlarmContext.build() return AlarmContext.build()
.text(jobTaskFailTextMessagesFormatter, .text(jobTaskFailTextMessagesFormatter,
EnvironmentUtils.getActiveProfile(), EnvironmentUtils.getActiveProfile(),
alarmDTO.getGroupName(), alarmDTO.getGroupName(),
@ -90,10 +90,6 @@ public class JobTaskFailAlarmListener extends AbstractJobAlarm<JobTaskFailAlarmE
DateUtils.toNowFormat(DateUtils.NORM_DATETIME_PATTERN)) DateUtils.toNowFormat(DateUtils.NORM_DATETIME_PATTERN))
.title("{}环境 JOB任务失败", EnvironmentUtils.getActiveProfile()) .title("{}环境 JOB任务失败", EnvironmentUtils.getActiveProfile())
.notifyAttribute(notifyConfig.getNotifyAttribute()); .notifyAttribute(notifyConfig.getNotifyAttribute());
Alarm<AlarmContext> alarmType = easyRetryAlarmFactory.getAlarmType(notifyConfig.getNotifyType());
alarmType.asyncSendMessage(context);
return context;
} }
@Override @Override

View File

@ -1,5 +1,5 @@
HELP.md HELP.md
../target/ target/
!.mvn/wrapper/maven-wrapper.jar !.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/ !**/src/main/**/target/
!**/src/test/**/target/ !**/src/test/**/target/

View File

@ -163,14 +163,14 @@
]" /> ]" />
</a-form-item> </a-form-item>
<a-form-item v-if="this.notifyTypeValue === '1'"> <a-form-item v-if="this.notifyTypeValue === '1'">
<span slot="label">@人手机号&nbsp;<a :href="officialWebsite + '/pages/32e4a0/#被@人手机号是何物' +''" target="_blank"> <a-icon type="question-circle-o" /></a></span> <span slot="label">@人手机号或钉钉号&nbsp;<a :href="officialWebsite + '/pages/32e4a0/#被@人手机号是何物' +''" target="_blank"> <a-icon type="question-circle-o" /></a></span>
<a-input <a-input
placeholder="请输入被@负责人手机号" placeholder="请输入被@人手机号或钉钉号"
type="textarea" type="textarea"
v-if="this.notifyTypeValue === '1'" v-if="this.notifyTypeValue === '1'"
v-decorator="[ v-decorator="[
'ats', 'ats',
{rules: [{ required: true, message: '请输入被@人手机号', whitespace: true}]} {rules: [{ required: true, message: '请输入被@人手机号或钉钉号', whitespace: true}]}
]" /> ]" />
</a-form-item> </a-form-item>
<a-form-item <a-form-item
@ -211,6 +211,7 @@
label="密码"> label="密码">
<a-input <a-input
placeholder="请输入密码" placeholder="请输入密码"
type="password"
v-if="this.notifyTypeValue === '2'" v-if="this.notifyTypeValue === '2'"
v-decorator="[ v-decorator="[
'pass', 'pass',
@ -384,7 +385,9 @@ export default {
if (this.formType === 'edit') { if (this.formType === 'edit') {
const formData = pick(JSON.parse(this.notifyAttribute), ['webhookUrl', 'ats', 'user', 'pass', 'host', 'port', 'from', 'tos']) const formData = pick(JSON.parse(this.notifyAttribute), ['webhookUrl', 'ats', 'user', 'pass', 'host', 'port', 'from', 'tos'])
this.notifyAttributeForm.getFieldDecorator(`webhookUrl`, { initialValue: formData.webhookUrl, preserve: true }) this.notifyAttributeForm.getFieldDecorator(`webhookUrl`, { initialValue: formData.webhookUrl, preserve: true })
this.notifyAttributeForm.getFieldDecorator(`ats`, { initialValue: formData.ats.join(','), preserve: true }) if (formData.ats) {
this.notifyAttributeForm.getFieldDecorator(`ats`, { initialValue: formData.ats.join(','), preserve: true })
}
this.notifyAttributeForm.getFieldDecorator(`user`, { initialValue: formData.user, preserve: true }) this.notifyAttributeForm.getFieldDecorator(`user`, { initialValue: formData.user, preserve: true })
this.notifyAttributeForm.getFieldDecorator(`pass`, { initialValue: formData.pass, preserve: true }) this.notifyAttributeForm.getFieldDecorator(`pass`, { initialValue: formData.pass, preserve: true })
this.notifyAttributeForm.getFieldDecorator(`host`, { initialValue: formData.host, preserve: true }) this.notifyAttributeForm.getFieldDecorator(`host`, { initialValue: formData.host, preserve: true })

View File

@ -211,6 +211,7 @@
label="密码"> label="密码">
<a-input <a-input
placeholder="请输入密码" placeholder="请输入密码"
type="password"
v-if="this.notifyTypeValue === '2'" v-if="this.notifyTypeValue === '2'"
v-decorator="[ v-decorator="[
'pass', 'pass',
@ -384,7 +385,9 @@ export default {
if (this.formType === 'edit') { if (this.formType === 'edit') {
const formData = pick(JSON.parse(this.notifyAttribute), ['webhookUrl', 'ats', 'user', 'pass', 'host', 'port', 'from', 'tos']) const formData = pick(JSON.parse(this.notifyAttribute), ['webhookUrl', 'ats', 'user', 'pass', 'host', 'port', 'from', 'tos'])
this.notifyAttributeForm.getFieldDecorator(`webhookUrl`, { initialValue: formData.webhookUrl, preserve: true }) this.notifyAttributeForm.getFieldDecorator(`webhookUrl`, { initialValue: formData.webhookUrl, preserve: true })
this.notifyAttributeForm.getFieldDecorator(`ats`, { initialValue: formData.ats.join(','), preserve: true }) if (formData.ats) {
this.notifyAttributeForm.getFieldDecorator(`ats`, { initialValue: formData.ats.join(','), preserve: true })
}
this.notifyAttributeForm.getFieldDecorator(`user`, { initialValue: formData.user, preserve: true }) this.notifyAttributeForm.getFieldDecorator(`user`, { initialValue: formData.user, preserve: true })
this.notifyAttributeForm.getFieldDecorator(`pass`, { initialValue: formData.pass, preserve: true }) this.notifyAttributeForm.getFieldDecorator(`pass`, { initialValue: formData.pass, preserve: true })
this.notifyAttributeForm.getFieldDecorator(`host`, { initialValue: formData.host, preserve: true }) this.notifyAttributeForm.getFieldDecorator(`host`, { initialValue: formData.host, preserve: true })