use of org.ow2.proactive.scheduler.task.TaskInfoImpl in project scheduling by ow2-proactive.
the class LiveJobs method updateTaskPausedOnerrorState.
private void updateTaskPausedOnerrorState(InternalJob job, TaskId taskToUpdate) {
try {
InternalTask t = job.getTask(taskToUpdate);
TaskInfo ti = new TaskInfoImpl((TaskInfoImpl) t.getTaskInfo());
listener.taskStateUpdated(job.getOwner(), new NotificationData<>(SchedulerEvent.TASK_IN_ERROR, ti));
} catch (UnknownTaskException e) {
logger.error(e);
}
}
use of org.ow2.proactive.scheduler.task.TaskInfoImpl in project scheduling by ow2-proactive.
the class LiveJobs method restartTaskOnError.
private void restartTaskOnError(JobData jobData, InternalTask task, TaskStatus status, TaskResultImpl result, long waitTime, TerminationData terminationData) {
InternalJob job = jobData.job;
tlogger.info(task.getId(), "node Exclusion : restart mode is '" + task.getRestartTaskOnError() + "'");
if (task.getRestartTaskOnError().equals(RestartMode.ELSEWHERE)) {
task.setNodeExclusion(task.getExecuterInformation().getNodes());
}
task.setStatus(status);
job.newWaitingTask();
dbManager.updateAfterTaskFinished(job, task, result);
listener.taskStateUpdated(job.getOwner(), new NotificationData<TaskInfo>(SchedulerEvent.TASK_WAITING_FOR_RESTART, new TaskInfoImpl((TaskInfoImpl) task.getTaskInfo())));
terminationData.addRestartData(task.getId(), waitTime);
logger.info("END restartTaskOnError");
}
Aggregations