Skip to content
Snippets Groups Projects
Commit f5eeee9a authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Added runGridModels to scheduled tasks

parent 19764642
No related branches found
No related tags found
No related merge requests found
...@@ -198,17 +198,22 @@ public class SchedulingBean { ...@@ -198,17 +198,22 @@ public class SchedulingBean {
SchedulingPattern everyNightPattern = new SchedulingPattern("0 6 * * *"); SchedulingPattern everyNightPattern = new SchedulingPattern("0 6 * * *");
deleteAllExpiredUserUuidsCollector.getTasks().add(everyNightPattern, VipsLogicTaskFactory.createVipsLogicTask(VipsLogicTaskFactory.DELETE_ALL_EXPIRED_UUIDS_TASK)); deleteAllExpiredUserUuidsCollector.getTasks().add(everyNightPattern, VipsLogicTaskFactory.createVipsLogicTask(VipsLogicTaskFactory.DELETE_ALL_EXPIRED_UUIDS_TASK));
// Sendt forecast notifications // Send forecast notifications
VIPSLogicTaskCollector sendForecastNotificationsCollector = new VIPSLogicTaskCollector(-1); VIPSLogicTaskCollector sendForecastNotificationsCollector = new VIPSLogicTaskCollector(-1);
SchedulingPattern morningAndAfternoonPattern = new SchedulingPattern("45 6,12 * * *"); SchedulingPattern morningAndAfternoonPattern = new SchedulingPattern("45 6,12 * * *");
sendForecastNotificationsCollector.getTasks().add(morningAndAfternoonPattern, VipsLogicTaskFactory.createVipsLogicTask(VipsLogicTaskFactory.SEND_FORECAST_EVENT_NOTIFICATIONS_TASK)); sendForecastNotificationsCollector.getTasks().add(morningAndAfternoonPattern, VipsLogicTaskFactory.createVipsLogicTask(VipsLogicTaskFactory.SEND_FORECAST_EVENT_NOTIFICATIONS_TASK));
// Run grid models
VIPSLogicTaskCollector runGridModelsCollector = new VIPSLogicTaskCollector(-1);
runGridModelsCollector.getTasks().add(everyNightPattern, VipsLogicTaskFactory.createVipsLogicTask(VipsLogicTaskFactory.RUN_GRID_MODELS_TASK));
List<TaskCollector> definedTasks = new ArrayList<>(); List<TaskCollector> definedTasks = new ArrayList<>();
definedTasks.add(modelRunCollector); definedTasks.add(modelRunCollector);
definedTasks.add(cacheHandlerCollector); definedTasks.add(cacheHandlerCollector);
definedTasks.add(summariesCollector); definedTasks.add(summariesCollector);
definedTasks.add(deleteAllExpiredUserUuidsCollector); definedTasks.add(deleteAllExpiredUserUuidsCollector);
definedTasks.add((sendForecastNotificationsCollector)); definedTasks.add(sendForecastNotificationsCollector);
definedTasks.add(runGridModelsCollector);
return definedTasks; return definedTasks;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment