Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7218 for trunk/sources


Ignore:
Timestamp:
12/21/11 10:34:36 (13 years ago)
Author:
ascheibe
Message:

#1672 renamed some jobs to tasks

Location:
trunk/sources/HeuristicLab.Clients.Hive/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveJobs/HiveTask.cs

    r7201 r7218  
    360360      childHiveTasksLock.EnterReadLock();
    361361      try {
    362         var jobs = new List<HiveTask>();
    363         jobs.Add(this);
     362        var tasks = new List<HiveTask>();
     363        tasks.Add(this);
    364364        foreach (HiveTask child in this.childHiveTasks) {
    365           jobs.AddRange(child.GetAllHiveTasks());
    366         }
    367         return jobs;
     365          tasks.AddRange(child.GetAllHiveTasks());
     366        }
     367        return tasks;
    368368      }
    369369      finally { childHiveTasksLock.ExitReadLock(); }
     
    405405    }
    406406
    407     public void RemoveByTaskId(Guid jobId) {
     407    public void RemoveByTaskId(Guid taskId) {
    408408      childHiveTasksLock.EnterWriteLock();
    409409      try {
    410         IEnumerable<HiveTask> jobs = childHiveTasks.Where(j => j.Task.Id == jobId).ToList();
    411         foreach (HiveTask j in jobs) {
    412           this.childHiveTasks.Remove(j);
     410        IEnumerable<HiveTask> tasks = childHiveTasks.Where(j => j.Task.Id == taskId).ToList();
     411        foreach (HiveTask t in tasks) {
     412          this.childHiveTasks.Remove(t);
    413413        }
    414414        foreach (HiveTask child in childHiveTasks) {
    415           child.RemoveByTaskId(jobId);
     415          child.RemoveByTaskId(taskId);
    416416        }
    417417      }
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveJobs/OptimizerHiveTask.cs

    r7177 r7218  
    185185    ///   add the runs from the optimizerTask to the batchrun and replace the Optimizer
    186186    /// </summary>
    187     public override void IntegrateChild(ItemTask task, Guid childJobId) {
     187    public override void IntegrateChild(ItemTask task, Guid childTaskId) {
    188188      var optimizerTask = (OptimizerTask)task;
    189189      syncTasksWithOptimizers = false; // don't sync with optimizers during this method
     
    198198
    199199      childHiveTasksLock.EnterReadLock();
    200       OptimizerHiveTask child = (OptimizerHiveTask)this.ChildHiveTasks.Single(j => j.Task.Id == childJobId);
     200      OptimizerHiveTask child = (OptimizerHiveTask)this.ChildHiveTasks.Single(j => j.Task.Id == childTaskId);
    201201      try {
    202202        if (!optimizerTask.ComputeInParallel) {
     
    329329    }
    330330
    331     public OptimizerHiveTask GetChildByOptimizerJob(OptimizerTask optimizerJob) {
     331    public OptimizerHiveTask GetChildByOptimizerTask(OptimizerTask optimizerTask) {
    332332      childHiveTasksLock.EnterReadLock();
    333333      try {
    334334        foreach (OptimizerHiveTask child in childHiveTasks) {
    335           if (child.ItemTask == optimizerJob)
     335          if (child.ItemTask == optimizerTask)
    336336            return child;
    337337        }
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/RefreshableJob.cs

    r7115 r7218  
    265265    private void jobResultPoller_JobResultReceived(object sender, EventArgs<IEnumerable<LightweightTask>> e) {
    266266      foreach (LightweightTask lightweightTask in e.Value) {
    267         HiveTask hiveTask = GetHiveJobById(lightweightTask.Id);
     267        HiveTask hiveTask = GetHiveTaskById(lightweightTask.Id);
    268268        if (hiveTask != null) {
    269269          // lastJobDataUpdate equals DateTime.MinValue right after it was uploaded. When the first results are polled, this value is updated
     
    279279            jobDownloader.DownloadTaskData(hiveTask.Task, (localJob, itemJob) => {
    280280              log.LogMessage(string.Format("Finished downloading task {0}", localJob.Id));
    281               HiveTask localHiveTask = GetHiveJobById(localJob.Id);
     281              HiveTask localHiveTask = GetHiveTaskById(localJob.Id);
    282282
    283283              if (itemJob == null) {
     
    294294                } else {
    295295                  if (localJob.ParentTaskId.HasValue) {
    296                     HiveTask parentHiveTask = GetHiveJobById(localJob.ParentTaskId.Value);
     296                    HiveTask parentHiveTask = GetHiveTaskById(localJob.ParentTaskId.Value);
    297297                    parentHiveTask.IntegrateChild(itemJob, localJob.Id);
    298298                  } else {
     
    317317    }
    318318
    319     public HiveTask GetHiveJobById(Guid jobId) {
    320       foreach (HiveTask job in this.HiveTasks) {
    321         var hj = job.GetHiveTaskByTaskId(jobId);
     319    public HiveTask GetHiveTaskById(Guid jobId) {
     320      foreach (HiveTask t in this.HiveTasks) {
     321        var hj = t.GetHiveTaskByTaskId(jobId);
    322322        if (hj != null)
    323323          return hj;
Note: See TracChangeset for help on using the changeset viewer.