use of org.objectweb.proactive.annotation.ImmediateService in project scheduling by ow2-proactive.
the class SchedulerFrontend method finishInErrorTask.
/**
* {@inheritDoc}
*/
@Override
@ImmediateService
public boolean finishInErrorTask(String jobId, String taskName) throws NotConnectedException, UnknownJobException, UnknownTaskException, PermissionException {
// checking permissions
final JobId jobIdObject = JobIdImpl.makeJobId(jobId);
frontendState.checkPermissions("finishTaskInError", frontendState.getIdentifiedJob(jobIdObject), YOU_DO_NOT_HAVE_PERMISSION_TO_FINISH_THIS_TASK);
return schedulingService.finishInErrorTask(jobIdObject, taskName);
}
use of org.objectweb.proactive.annotation.ImmediateService in project scheduling by ow2-proactive.
the class SchedulerFrontend method getTaskServerLogsByTag.
@Override
@ImmediateService
public String getTaskServerLogsByTag(String jobId, String taskTag) throws UnknownJobException, NotConnectedException, PermissionException {
JobId id = JobIdImpl.makeJobId(jobId);
frontendState.checkPermissions("getTaskServerLogsByTag", frontendState.getIdentifiedJob(id), YOU_DO_NOT_HAVE_PERMISSION_TO_GET_THE_TASK_LOGS_OF_THIS_JOB);
List<TaskState> lTaskState = frontendState.getJobState(id).getTasksByTag(taskTag);
Set<TaskId> tasksIds = new HashSet<>(lTaskState.size());
for (TaskState taskState : lTaskState) {
tasksIds.add(taskState.getId());
}
return ServerJobAndTaskLogs.getJobLog(id, tasksIds);
}
Aggregations