This commit is contained in:
@@ -105,7 +105,8 @@ public class MonitoringSearchService {
|
||||
context.put("status", NotificationType.SEARCH_OPERATION_FAILED.name());
|
||||
context.put("error_message", e.getMessage());
|
||||
|
||||
notificationService.addNotification(NotificationType.SEARCH_OPERATION_FAILED, user.getId(), context);
|
||||
notificationService.addNotification(NotificationType.SEARCH_OPERATION_FAILED, user.getId(),
|
||||
context.toString());
|
||||
}
|
||||
} else {
|
||||
log.info("Yandex search is disabled by settings");
|
||||
@@ -136,7 +137,8 @@ public class MonitoringSearchService {
|
||||
context.put("next_run", Objects.requireNonNull(calculateNextRun(
|
||||
monitoring.getMonitoringType())).format(DateTimeFormatter.ofPattern("dd.MM.yyyy HH:mm")));
|
||||
|
||||
notificationService.addNotification(NotificationType.SEARCH_OPERATION_FAILED, user.getId(), context);
|
||||
notificationService.addNotification(NotificationType.SEARCH_OPERATION_FAILED, user.getId(),
|
||||
context.toString());
|
||||
}
|
||||
} else {
|
||||
log.info("Google search is disabled by settings");
|
||||
@@ -182,7 +184,7 @@ public class MonitoringSearchService {
|
||||
context.put("next_run", Objects.requireNonNull(calculateNextRun(
|
||||
monitoring.getMonitoringType())).format(DateTimeFormatter.ofPattern("dd.MM.yyyy HH:mm")));
|
||||
|
||||
notificationService.addNotification(NotificationType.TOKEN_NOT_FOUND, user.getId(), context);
|
||||
notificationService.addNotification(NotificationType.TOKEN_NOT_FOUND, user.getId(), context.toString());
|
||||
} catch (Exception e) {
|
||||
log.error("Error processing monitoring search", e);
|
||||
monitoring.setLastRunStatus("ERROR: " + e.getMessage());
|
||||
@@ -197,7 +199,8 @@ public class MonitoringSearchService {
|
||||
context.put("next_run", Objects.requireNonNull(calculateNextRun(
|
||||
monitoring.getMonitoringType())).format(DateTimeFormatter.ofPattern("dd.MM.yyyy HH:mm")));
|
||||
|
||||
notificationService.addNotification(NotificationType.SEARCH_OPERATION_FAILED, user.getId(), context);
|
||||
notificationService.addNotification(NotificationType.SEARCH_OPERATION_FAILED, user.getId(),
|
||||
context.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user