- Timestamp:
- 01/02/12 11:40:31 (12 years ago)
- Location:
- branches/RegressionBenchmarks
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RegressionBenchmarks
-
branches/RegressionBenchmarks/HeuristicLab.Services.Hive/3.3/HiveDao.cs
r6983 r7255 115 115 using (var db = CreateContext()) { 116 116 var resourceIds = GetParentResources(slave.Id).Select(r => r.Id); 117 var waitingParentJobs = GetParentTasks(resourceIds, count, false); 118 if (count > 0 && waitingParentJobs.Count() >= count) return waitingParentJobs.Take(count).ToArray(); 117 //Originally we checked here if there are parent tasks which should be calculated (with GetParentTasks(resourceIds, count, false);). 118 //Because there is at the moment no case where this makes sense (there don't exist parent tasks which need to be calculated), 119 //we skip this step because it's wasted runtime 119 120 120 121 var query = from ar in db.AssignedResources … … 127 128 select DT.Convert.ToDto(ar.Task); 128 129 var waitingTasks = (count == 0 ? query : query.Take(count)).ToArray(); 129 return waitingTasks .Union(waitingParentJobs).OrderByDescending(x => x.Priority);130 return waitingTasks; 130 131 } 131 132 }
Note: See TracChangeset
for help on using the changeset viewer.