From 38ba1e1c12ce4113fdb1f104d109cd1e9d6a898f Mon Sep 17 00:00:00 2001 From: dangel101 Date: Sun, 1 Jan 2023 16:36:43 +0200 Subject: [PATCH] executing ansible runner artifacts clean up with fixed delay Ansible-Runner artifacts are cleaned up periodically according to the properties configured in engine-config: AnsibleRunnerArtifactsLifetimeInDays: How many days artifacts will be kept before they are cleaned up AnsibleRunnerArtifactsCleanupCheckTimeInHours: The periodic time to execute the clean up Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=2151549 Signed-off-by: dangel101 --- .../engine/core/bll/validator/AnsibleRunnerCleanUpService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/AnsibleRunnerCleanUpService.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/AnsibleRunnerCleanUpService.java index 489579e4ee2..19606a9755a 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/AnsibleRunnerCleanUpService.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/AnsibleRunnerCleanUpService.java @@ -40,7 +40,8 @@ public void scheduleJob() { final int HOURS_TO_MINUTES = 60; long intervalInMinutes = Math.round(interval * HOURS_TO_MINUTES); - executor.schedule(this::checkExecutionTimeStamp, + executor.scheduleWithFixedDelay(this::checkExecutionTimeStamp, + 10, intervalInMinutes, TimeUnit.MINUTES); }