Changeset 7178
- Timestamp:
- 12/12/11 19:19:05 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Services.Hive/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Services.Hive/3.3/HiveDao.cs
r6983 r7178 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 } -
trunk/sources/HeuristicLab.Services.Hive/3.3/Manager/EventManager.cs
r6983 r7178 43 43 44 44 public void Cleanup() { 45 log.Log("EventManager.Cleanup()");46 45 SetTimeoutSlavesOffline(); 47 46 SetTimeoutTasksWaiting();
Note: See TracChangeset
for help on using the changeset viewer.