Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8688


Ignore:
Timestamp:
09/24/12 15:44:39 (12 years ago)
Author:
ascheibe
Message:

#1882 fixed collecting runs from deeply nested tasks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.cs

    r8341 r8688  
    533533
    534534        foreach (HiveTask subTask in job.HiveTasks) {
    535           if (subTask is OptimizerHiveTask) {
    536             OptimizerHiveTask ohTask = subTask as OptimizerHiveTask;
    537             runs.AddRange(ohTask.ItemTask.Item.Runs);
    538           }
     535          GetAllRunsFromHiveTask(runs, subTask);
    539536        }
    540537        return runs;
    541538      } else {
    542539        return null;
     540      }
     541    }
     542
     543    private void GetAllRunsFromHiveTask(RunCollection runs, HiveTask task) {
     544      foreach (HiveTask subTask in task.ChildHiveTasks) {
     545        GetAllRunsFromHiveTask(runs, subTask);
     546      }
     547
     548      if (task.ChildHiveTasks.Count == 0) {
     549        if (task is OptimizerHiveTask) {
     550          OptimizerHiveTask ohTask = task as OptimizerHiveTask;
     551          runs.AddRange(ohTask.ItemTask.Item.Runs);
     552        }
    543553      }
    544554    }
Note: See TracChangeset for help on using the changeset viewer.