修复邮件重复发送Bug

This commit is contained in:
2023-05-12 07:53:49 +08:00
parent 0b5cb89383
commit b76b7769a8
2 changed files with 3 additions and 5 deletions
-5
View File
@@ -149,11 +149,6 @@
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>2.7.8</version>
</dependency>
<!--暴露端点-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
<build>
@@ -108,6 +108,7 @@ public class CheckInstancesStatus {
}
if (container.getNotify().equals(SystemConstant.NOTIFY_EMAIL)) {
notificationService.sendContainerOfflineEmail(container.getId());
set.add(container.getId().toString());
}
if (container.getNotify().equals(SystemConstant.NOTIFY_BROWSER_EMAIL)) {
notificationService.sendContainerOfflineNotificationEmail(container.getId());
@@ -171,6 +172,7 @@ public class CheckInstancesStatus {
}
if (vm.getNotify().equals(SystemConstant.NOTIFY_EMAIL)) {
notificationService.sendContainerOfflineEmail(vm.getId());
set.add(vm.getId().toString());
}
if (vm.getNotify().equals(SystemConstant.NOTIFY_BROWSER_EMAIL)) {
notificationService.sendContainerOfflineNotificationEmail(vm.getId());
@@ -218,6 +220,7 @@ public class CheckInstancesStatus {
}
if (hostMachine.getNotify().equals(SystemConstant.NOTIFY_EMAIL)) {
notificationService.sendContainerOfflineEmail(hostMachine.getId());
set.add(hostMachine.getId().toString());
}
if (hostMachine.getNotify().equals(SystemConstant.NOTIFY_BROWSER_EMAIL)) {
notificationService.sendContainerOfflineNotificationEmail(hostMachine.getId());