diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-05-07 13:42:39 +0200 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-05-07 13:42:39 +0200 |
commit | 717018f3d1d8ef2a6f9b7e45be57a75eb7ea7050 (patch) | |
tree | 62d998e3133e305fe957d24f1e5ac60b4c10a677 /app/src/main/java/org/onap/portal/history/configuration/SchedulerConfig.java | |
parent | a3e692a4e0309342f8c8f60ce8fdeb0d2f14ab5c (diff) |
Adjust history package name to use org.onap.portalng instead of org.onap.portal
Issue-ID: PORTALNG-92
Change-Id: I67f5a75834960ace8cb5ee6846c6741dc69fde2f
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 | 52 |
1 files changed, 0 insertions, 52 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 deleted file mode 100644 index 88531af..0000000 --- a/app/src/main/java/org/onap/portal/history/configuration/SchedulerConfig.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * - * Copyright (c) 2022. Deutsche Telekom AG - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * - * - */ - -package org.onap.portal.history.configuration; - -import org.onap.portal.history.services.ActionsService; -import lombok.extern.slf4j.Slf4j; -import org.springframework.scheduling.annotation.EnableScheduling; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Component; - -@Slf4j -@Component -@EnableScheduling -public class SchedulerConfig { - - private final ActionsService actionsService; - private final HistoryConfig historyConfig; - - public SchedulerConfig(ActionsService actionsService, HistoryConfig historyConfig){ - this.actionsService = actionsService; - 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="${history.delete-interval}") - public void runDeleteActions(){ - actionsService.deleteActions(historyConfig.getSaveInterval()); - log.info("Delete actions in scheduled job"); - } -} |