diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2023-08-29 10:56:22 +0200 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2023-08-29 10:56:22 +0200 |
commit | 7f439188b428a3799a1baba4218e25853b66c882 (patch) | |
tree | c95b6a70ba7d09e10b6c65dca1904328a558ffaa /app/src/main/java/org/onap/portal/history/configuration/SchedulerConfig.java | |
parent | 04102c3c3ea38e489f6d777c31f2f65d38e3d047 (diff) |
Consistently use the history name in the history codebase
- remove portal prefix
Issue-ID: PORTALNG-51
Change-Id: I2a0b68bdb6e972813a8a8f048c5d05add97754d2
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'app/src/main/java/org/onap/portal/history/configuration/SchedulerConfig.java')
-rw-r--r-- | app/src/main/java/org/onap/portal/history/configuration/SchedulerConfig.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/app/src/main/java/org/onap/portal/history/configuration/SchedulerConfig.java b/app/src/main/java/org/onap/portal/history/configuration/SchedulerConfig.java index 2295a5f..88531af 100644 --- a/app/src/main/java/org/onap/portal/history/configuration/SchedulerConfig.java +++ b/app/src/main/java/org/onap/portal/history/configuration/SchedulerConfig.java @@ -23,7 +23,6 @@ package org.onap.portal.history.configuration; import org.onap.portal.history.services.ActionsService; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @@ -34,20 +33,20 @@ import org.springframework.stereotype.Component; public class SchedulerConfig { private final ActionsService actionsService; - private final PortalHistoryConfig portalHistoryConfig; + private final HistoryConfig historyConfig; - public SchedulerConfig(ActionsService actionsService, PortalHistoryConfig portalHistoryConfig){ + public SchedulerConfig(ActionsService actionsService, HistoryConfig historyConfig){ this.actionsService = actionsService; - this.portalHistoryConfig = portalHistoryConfig; + this.historyConfig = historyConfig; } /** * This method will be trigger by Spring Boot scheduler. * The cron execution time is configured in the application properties as well as the save interval. */ - @Scheduled(cron="${portal-history.delete-interval}") + @Scheduled(cron="${history.delete-interval}") public void runDeleteActions(){ - actionsService.deleteActions(portalHistoryConfig.getSaveInterval()); + actionsService.deleteActions(historyConfig.getSaveInterval()); log.info("Delete actions in scheduled job"); } } |