Changeset 4264 for branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/DefaultScheduler.cs
- Timestamp:
- 08/19/10 13:30:56 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/DefaultScheduler.cs
r4263 r4264 21 21 22 22 public bool ExistsJobForSlave(HeartBeatData hbData) { 23 List<JobDto> allOfflineJobsForSlave = new List<JobDto>(DaoLocator.JobDao.FindFittingJobsForSlave( State.Offline, hbData.FreeCores, hbData.FreeMemory, hbData.SlaveId));23 List<JobDto> allOfflineJobsForSlave = new List<JobDto>(DaoLocator.JobDao.FindFittingJobsForSlave(JobState.Offline, hbData.FreeCores, hbData.FreeMemory, hbData.SlaveId)); 24 24 return (allOfflineJobsForSlave != null && allOfflineJobsForSlave.Count > 0); 25 25 } … … 31 31 using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = ApplicationConstants.ISOLATION_LEVEL_SCOPE })) { 32 32 ClientDto slave = DaoLocator.ClientDao.FindById(slaveId); 33 LinkedList<JobDto> allOfflineJobsForSlave = new LinkedList<JobDto>(DaoLocator.JobDao.FindFittingJobsForSlave( State.Offline, slave.NrOfFreeCores, slave.FreeMemory, slave.Id));33 LinkedList<JobDto> allOfflineJobsForSlave = new LinkedList<JobDto>(DaoLocator.JobDao.FindFittingJobsForSlave(JobState.Offline, slave.NrOfFreeCores, slave.FreeMemory, slave.Id)); 34 34 if (allOfflineJobsForSlave != null && allOfflineJobsForSlave.Count > 0) { 35 35 jobToCalculate = allOfflineJobsForSlave.First.Value; 36 jobToCalculate.State = State.Calculating;36 jobToCalculate.State = JobState.Calculating; 37 37 jobToCalculate.Client = slave; 38 jobToCalculate.Client.State = S tate.Calculating;38 jobToCalculate.Client.State = SlaveState.Calculating; 39 39 jobToCalculate.DateCalculated = DateTime.Now; 40 40 DaoLocator.JobDao.AssignSlaveToJob(slave.Id, jobToCalculate.Id);
Note: See TracChangeset
for help on using the changeset viewer.