Make sure completed tasks retention limit is respected upon server restarts.
| | |
| | | the same ID |
| | | SEVERE_ERR_TASKSCHED_DUPLICATE_TASK_ID_134=Unable to schedule task %s because \ |
| | | another task already exists with the same ID |
| | | MILD_WARN_TASKSCHED_DUPLICATE_TASK_ID_135=Unable to add completed task %s to \ |
| | | the task scheduler because another task already exists with the same ID |
| | | SEVERE_ERR_TASKSCHED_ERROR_SCHEDULING_RECURRING_ITERATION_136=An error \ |
| | | occurred while attempting to schedule the next iteration of recurring task \ |
| | | %s: %s |
| | |
| | | Task task = entryToScheduledTask(entry, null); |
| | | if (TaskState.isDone(task.getTaskState())) |
| | | { |
| | | completedTasks.add(task); |
| | | String id = task.getTaskID(); |
| | | if (tasks.containsKey(id)) |
| | | { |
| | | Message message = |
| | | WARN_TASKSCHED_DUPLICATE_TASK_ID.get( |
| | | String.valueOf(id)); |
| | | logError(message); |
| | | } |
| | | else |
| | | { |
| | | completedTasks.add(task); |
| | | tasks.put(id, task); |
| | | } |
| | | } |
| | | else |
| | | { |