Exemplo n.º 1
0
  private void filterOutSendedWarnings(ProjectInformation pi, BatchIntervalInfo bi) {
    List<TaskInformation> tasks = pi.getTasks();

    for (int i = tasks.size() - 1; i >= 0; i--) {
      Date d = batchPersisterService.getLastSendedFor(tasks.get(i).getId());
      if (d != null) {
        if (new Date().getTime() - bi.getMailSendingInterval() * 60 * 24 * 60 * 1000 - d.getTime()
            <= 0) {
          System.out.println("MAILSENDEDFILTER TASK: " + tasks.get(i));
          tasks.remove(i);
        }
      }
    }
  }
Exemplo n.º 2
0
 private void markTasksAsSended(ProjectInformation pi) {
   List<TaskInformation> tasks = pi.getTasks();
   for (TaskInformation taskInformation : tasks) {
     batchPersisterService.markAsSended(taskInformation.getId(), new Date());
   }
 }