From f0eca88a591f447beb58d95900ed48198cf9a941 Mon Sep 17 00:00:00 2001 From: Tor-Einar Skog <tor-einar.skog@nibio.no> Date: Mon, 17 Sep 2018 10:11:49 +0200 Subject: [PATCH] Avoiding excessive logging statements --- .../vips/logic/controller/session/SchedulingBean.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/no/nibio/vips/logic/controller/session/SchedulingBean.java b/src/main/java/no/nibio/vips/logic/controller/session/SchedulingBean.java index 3412c4d7..2e8922cc 100755 --- a/src/main/java/no/nibio/vips/logic/controller/session/SchedulingBean.java +++ b/src/main/java/no/nibio/vips/logic/controller/session/SchedulingBean.java @@ -164,6 +164,7 @@ public class SchedulingBean { // The different scheduling patterns. See http://www.adminschoice.com/crontab-quick-reference SchedulingPattern halfPastPattern = new SchedulingPattern("30 * * * *"); + SchedulingPattern halfPastEveryThreeHoursPattern = new SchedulingPattern("30 */3 * * *"); SchedulingPattern onTheHourPattern = new SchedulingPattern("0 * * * *"); SchedulingPattern every10MinsPattern = new SchedulingPattern("*/10 * * * *"); SchedulingPattern every20MinsPattern = new SchedulingPattern("*/20 * * * *"); @@ -181,15 +182,15 @@ public class SchedulingBean { { VipsLogicTask runAllForecastsTask = VipsLogicTaskFactory.createVipsLogicTask(VipsLogicTaskFactory.RUN_ALL_FORECAST_CONFIGURATIONS_TASK); runAllForecastsTask.setOrganization(org); - modelRunCollector.getTasks().add(halfPastPattern, runAllForecastsTask); + modelRunCollector.getTasks().add(halfPastEveryThreeHoursPattern, runAllForecastsTask); } } else // We run an empty job for all VIPS systems just to show that we've tried, but there's nothing to do { VipsLogicTask runAllForecastsTask = VipsLogicTaskFactory.createVipsLogicTask(VipsLogicTaskFactory.RUN_ALL_FORECAST_CONFIGURATIONS_TASK); - modelRunCollector.getTasks().add(halfPastPattern, runAllForecastsTask); + modelRunCollector.getTasks().add(halfPastEveryThreeHoursPattern, runAllForecastsTask); } - modelRunCollector.getTasks().add(halfPastPattern, VipsLogicTaskFactory.createVipsLogicTask(VipsLogicTaskFactory.UPDATE_MODEL_INFORMATION_TASK)); + modelRunCollector.getTasks().add(halfPastEveryThreeHoursPattern, VipsLogicTaskFactory.createVipsLogicTask(VipsLogicTaskFactory.UPDATE_MODEL_INFORMATION_TASK)); // Update forecast cache @@ -448,7 +449,7 @@ public class SchedulingBean { " failed at + " + taskExecutor.getStartTime() + ", finished at " + new Date() + ". Status is " + taskHistory.getTaskHistoryStatusId() + - ". Error was " + taskHistory.getMessage() + + ". Error was " + taskHistory.getMessage().substring(0,400) + "[...]" + " ############"); } -- GitLab