From 291b6ad502ce1c444e128621378550d7b94f667e Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 12 Sep 2016 13:38:57 +0200 Subject: [server] Don't debug-log already expired lectures --- .../main/java/org/openslx/bwlp/sat/maintenance/SendExpireWarning.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dozentenmodulserver/src/main/java') 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 adbf1c12..1204c2a2 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 @@ -72,8 +72,8 @@ public class SendExpireWarning implements Runnable { final long now = Util.unixTime(); for (LectureSummary lecture : lectures) { final int days = (int) ((lecture.endTime - now) / 86400); - LOGGER.debug(lecture.lectureName + " expires in " + days); if ((lecture.isEnabled && (days == 14 || days == 1)) || (days == 7)) { + LOGGER.debug(lecture.lectureName + " expires in " + days); MailGenerator.sendLectureExpiringReminder(lecture, days); } } @@ -101,6 +101,7 @@ public class SendExpireWarning implements Runnable { || (!version.isValid && days == 3); boolean mailForced = version.isValid && days == 1; if (mailNormal || mailForced) { + LOGGER.debug(version.imageVersionId + " expires in " + days); MailGenerator.sendImageDeletionReminder(version, days, mailForced); } } -- cgit v1.2.3-55-g7522