Browse Source

refactoring

pull/14605/head
Sergey Matvienko 8 months ago
parent
commit
f2538117ce
  1. 4
      monitoring/src/main/java/org/thingsboard/monitoring/notification/NotificationService.java

4
monitoring/src/main/java/org/thingsboard/monitoring/notification/NotificationService.java

@ -64,11 +64,11 @@ public class NotificationService {
try {
notificationExecutor.shutdown();
if (!notificationExecutor.awaitTermination(10, TimeUnit.SECONDS)) {
java.util.List<Runnable> dropped = notificationExecutor.shutdownNow();
var dropped = notificationExecutor.shutdownNow();
log.warn("Notification executor did not terminate in time. Forced shutdown; {} task(s) will not be executed.", dropped.size());
}
} catch (InterruptedException e) {
java.util.List<Runnable> dropped = notificationExecutor.shutdownNow();
var dropped = notificationExecutor.shutdownNow();
Thread.currentThread().interrupt();
log.warn("Interrupted during notification executor shutdown. Forced shutdown; {} task(s) will not be executed.", dropped.size());
} catch (Exception e) {

Loading…
Cancel
Save