Changeset 1151 for DCWoRMS/branches/coolemall/src/schedframe/scheduling/manager/tasks/JobRegistryImpl.java
- Timestamp:
- 07/31/13 15:29:05 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/schedframe/scheduling/manager/tasks/JobRegistryImpl.java
r1083 r1151 38 38 39 39 public boolean addExecTask(ExecTask newTask) { 40 if(get Executable(newTask.getJobId(), newTask.getId()) == null) {40 if(getTask(newTask.getJobId(), newTask.getId()) == null) { 41 41 synchronized (executables) { 42 42 executables.add(newTask); … … 47 47 } 48 48 49 public ExecutablesList get ExecutableTasks() {49 public ExecutablesList getTasks() { 50 50 return executables; 51 51 } … … 81 81 } 82 82 83 public ExecTask get Executable(String jobId, String taskId){83 public ExecTask getTask(String jobId, String taskId){ 84 84 synchronized (executables) { 85 85 for (ExecTask task : executables) { … … 93 93 94 94 @SuppressWarnings("unchecked") 95 public List<Task> getAvailableTasks(List<JobInterface<?>> wuList) {95 public List<Task> getAvailableTasks(List<JobInterface<?>> jobList) { 96 96 List<Task> availableTasks = new ArrayList<Task>(); 97 97 List<Task> waitingTasks = new ArrayList<Task>(); 98 98 99 for(int i = 0; i < wuList.size(); i++){100 JobInterface<?> wu = (JobInterface<?>)wuList.get(i);101 waitingTasks.addAll((List<Task>) wu.getTask());99 for(int i = 0; i < jobList.size(); i++){ 100 JobInterface<?> job = (JobInterface<?>)jobList.get(i); 101 waitingTasks.addAll((List<Task>)job.getTask()); 102 102 } 103 103 … … 178 178 ParentType par = w.getParent(j); 179 179 if(par.getTriggerState().compareTo(TaskStatesName.FINISHED) == 0){ 180 if(!checkTaskCompletion(task.getJobId(), par.getContent())){ 180 if(par.getContent().contains("_")){ 181 if(!checkTaskCompletion(par.getContent().split("_")[0], par.getContent().split("_")[1])){ 182 continue; 183 } 184 } 185 else if(!checkTaskCompletion(task.getJobId(), par.getContent())){ 181 186 continue; 182 187 }
Note: See TracChangeset
for help on using the changeset viewer.