Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/08/11 13:41:25 (13 years ago)
Author:
ascheibe
Message:

#1233 Review comments: renamed Job to Task

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/Manager/HeartbeatManager.cs

    r6717 r6721  
    7171
    7272    // returns true if assignment was successful
    73     private bool AssignJob(Slave slave, Job job) {
     73    private bool AssignJob(Slave slave, Task job) {
    7474      // 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;
    7676
    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);
    7878
    7979      // from now on the job has some time to send the next heartbeat (ApplicationConstants.TransferringJobHeartbeatTimeout)
     
    9898        // process the jobProgresses
    9999        foreach (var jobProgress in heartbeat.JobProgress) {
    100           Job curJob = dao.GetJob(jobProgress.Key);
     100          Task curJob = dao.GetJob(jobProgress.Key);
    101101          if (curJob == null) {
    102102            // job does not exist in db
     
    135135    }
    136136
    137     private bool JobIsAllowedToBeCalculatedBySlave(Guid slaveId, Job curJob) {
     137    private bool JobIsAllowedToBeCalculatedBySlave(Guid slaveId, Task curJob) {
    138138      var assignedResourceIds = dao.GetAssignedResources(curJob.Id).Select(x => x.Id);
    139139      var slaveResourceIds = dao.GetParentResources(slaveId).Select(x => x.Id);
Note: See TracChangeset for help on using the changeset viewer.