Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/03/11 17:08:54 (13 years ago)
Author:
cneumuel
Message:

#1233

  • renamed engines to executors
  • changed locking in StartJobInAppDomain
  • avoid destruction of proxy object after 5 minutes for Slave.Core
  • added JobStarted event and fixed ExecutionStateChanged and ExecutionTimeChanged
  • slaves which are moved to another slavegroup will pause their jobs now, if they must not calculate them
File:
1 edited

Legend:

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

    r5786 r6110  
    8282            actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, curJob.Id));
    8383            LogFactory.GetLogger(this.GetType().Namespace).Log("The slave " + heartbeat.SlaveId + " is not supposed to calculate Job: " + curJob);
     84          } else if (!JobIsAllowedToBeCalculatedBySlave(heartbeat.SlaveId, curJob)) {
     85            // assigned resources ids of job do not match with slaveId (and parent resourceGroupIds); this might happen when slave is moved to different group
     86            actions.Add(new MessageContainer(MessageContainer.MessageType.PauseJob, curJob.Id));
    8487          } else {
    8588            // save job execution time
     
    104107      return actions;
    105108    }
     109
     110    private bool JobIsAllowedToBeCalculatedBySlave(Guid slaveId, Job curJob) {
     111      var assignedResourceIds = dao.GetAssignedResources(curJob.Id).Select(x => x.Id);
     112      var slaveResourceIds = dao.GetParentResources(slaveId).Select(x => x.Id);
     113      return assignedResourceIds.Any(x => slaveResourceIds.Contains(x));
     114    }
    106115  }
    107116}
Note: See TracChangeset for help on using the changeset viewer.