Changeset 6721 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/Manager/HeartbeatManager.cs
- Timestamp:
- 09/08/11 13:41:25 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/Manager/HeartbeatManager.cs
r6717 r6721 71 71 72 72 // returns true if assignment was successful 73 private bool AssignJob(Slave slave, Jobjob) {73 private bool AssignJob(Slave slave, Task job) { 74 74 // load job again and check if it is still available (this is an attempt to reduce the race condition which causes multiple heartbeats to get the same job assigned) 75 if (dao.GetJob(job.Id).State != JobState.Waiting) return false;75 if (dao.GetJob(job.Id).State != TaskState.Waiting) return false; 76 76 77 job = dao.UpdateJobState(job.Id, DataAccess. JobState.Transferring, slave.Id, null, null);77 job = dao.UpdateJobState(job.Id, DataAccess.TaskState.Transferring, slave.Id, null, null); 78 78 79 79 // from now on the job has some time to send the next heartbeat (ApplicationConstants.TransferringJobHeartbeatTimeout) … … 98 98 // process the jobProgresses 99 99 foreach (var jobProgress in heartbeat.JobProgress) { 100 JobcurJob = dao.GetJob(jobProgress.Key);100 Task curJob = dao.GetJob(jobProgress.Key); 101 101 if (curJob == null) { 102 102 // job does not exist in db … … 135 135 } 136 136 137 private bool JobIsAllowedToBeCalculatedBySlave(Guid slaveId, JobcurJob) {137 private bool JobIsAllowedToBeCalculatedBySlave(Guid slaveId, Task curJob) { 138 138 var assignedResourceIds = dao.GetAssignedResources(curJob.Id).Select(x => x.Id); 139 139 var slaveResourceIds = dao.GetParentResources(slaveId).Select(x => x.Id);
Note: See TracChangeset
for help on using the changeset viewer.