dev add notification entity
Test Workflow / test (push) Successful in 3s

This commit is contained in:
vladp
2026-04-02 11:24:26 +07:00
parent 8bc95efa2b
commit e87c14198b
2 changed files with 10 additions and 1 deletions
@@ -1,6 +1,14 @@
package ru.soune.nocopy.entity.monitoring; package ru.soune.nocopy.entity.monitoring;
import lombok.Getter;
@Getter
public enum MonitoringType { public enum MonitoringType {
MONITORING_DAILY, MONITORING_WEEKLY, MONITORING_MONTHLY, NONE MONITORING_DAILY(1), MONITORING_WEEKLY(7), MONITORING_MONTHLY(30), NONE(0);
private final int days;
MonitoringType(int days) {
this.days = days;
}
} }
@@ -131,6 +131,7 @@ public class MonitoringSearchService {
} }
monitoring.setLastRunStatus("SUCCESS"); monitoring.setLastRunStatus("SUCCESS");
monitoring.setNextRun(LocalDateTime.now().plusDays(monitoringType.getDays()));
if (uniqueResults.isEmpty()) { if (uniqueResults.isEmpty()) {
log.info("No results found for monitoring file {}", monitoring.getFile().getId()); log.info("No results found for monitoring file {}", monitoring.getFile().getId());