From 198d6de7b5fbdbe3c0a97dc03e27068a680d8f1d Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 9 Nov 2022 09:47:16 +0100 Subject: [server] Make maintenance tasks a bit less spammy --- .../main/java/org/openslx/bwlp/sat/maintenance/DeleteOldImages.java | 3 +-- .../java/org/openslx/bwlp/sat/maintenance/DeleteOldLectures.java | 2 +- .../java/org/openslx/bwlp/sat/maintenance/SendExpireWarning.java | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'dozentenmodulserver') diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/maintenance/DeleteOldImages.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/maintenance/DeleteOldImages.java index b255e885..d07332a5 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/maintenance/DeleteOldImages.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/maintenance/DeleteOldImages.java @@ -66,7 +66,7 @@ public class DeleteOldImages implements Runnable { @Override public void run() { // Get all images currently marked as "Should delete" and reset them to "keep" - LOGGER.info("Marking old/expired images for deletion..."); + LOGGER.info("Looking for old image versions to delete..."); Set resetList; try { resetList = DbImage.resetDeleteState(); @@ -77,7 +77,6 @@ public class DeleteOldImages implements Runnable { LOGGER.warn("Will not execute deletion of old images; store seems to be unmounted!"); return; } - LOGGER.info("Looking for old image versions to delete"); Set versions = new HashSet<>(); // First get a list of all image versions which reached their expire date, // no matter if valid or invalid diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/maintenance/DeleteOldLectures.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/maintenance/DeleteOldLectures.java index d4018fd5..3f2144c8 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/maintenance/DeleteOldLectures.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/maintenance/DeleteOldLectures.java @@ -62,7 +62,7 @@ public class DeleteOldLectures implements Runnable { cnt = DbLecture.deleteOld(365); } catch (SQLException e) { } - LOGGER.info("Deleted " + cnt + "lectures"); + LOGGER.info("Deleted " + cnt + " lectures"); } } diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/maintenance/SendExpireWarning.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/maintenance/SendExpireWarning.java index 5ef935d0..59692312 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/maintenance/SendExpireWarning.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/maintenance/SendExpireWarning.java @@ -57,7 +57,7 @@ public class SendExpireWarning implements Runnable { @Override public void run() { - LOGGER.info("Scanning for expiring lectures and VMs to send mail reminders..."); + // Start log message in methods below checkImages(); checkLectures(); LOGGER.info("Done scanning for expired lectures/VMs"); @@ -71,7 +71,7 @@ public class SendExpireWarning implements Runnable { LOGGER.warn("Could not get list of expiring lectures; skipping warning mails"); return; } - LOGGER.info("Scanning expiring lectures to send mails to users"); + LOGGER.info("Scanning expiring lectures to send mails to users..."); final long now = Util.unixTime(); for (LectureSummary lecture : lectures) { final int days = (int) ((lecture.endTime - now) / 86400); @@ -95,7 +95,7 @@ public class SendExpireWarning implements Runnable { LOGGER.warn("Could not determine expiring versions; skipping warning mails"); return; } - LOGGER.info("Scanning for expiring images to send mails to users"); + LOGGER.info("Scanning for expiring images to send mails to users..."); // Send reminder on certain days final long now = Util.unixTime(); for (LocalImageVersion version : versions) { -- cgit v1.2.3-55-g7522