This commit is contained in:
@@ -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());
|
||||||
|
|||||||
Reference in New Issue
Block a user