Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/08/11 00:04:16 (13 years ago)
Author:
cneumuel
Message:

#1233

  • locking for childHiveJobs in OptimizerHiveJob avoid multi threaded access issues
  • added IsPrivileged to gui
  • minor changes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/HiveClient.cs

    r6373 r6381  
    225225
    226226          foreach (HiveJob hiveJob in refreshableHiveExperiment.HiveExperiment.HiveJobs) {
    227             UploadJobWithChildren(refreshableHiveExperiment.HiveExperiment.Progress, service, hiveJob, null, resourceIds, ref jobCount, totalJobCount, configFilePlugin.Id, refreshableHiveExperiment.HiveExperiment.UseLocalPlugins, refreshableHiveExperiment.HiveExperiment.Id, refreshableHiveExperiment.Log);
     227            UploadJobWithChildren(refreshableHiveExperiment.HiveExperiment.Progress, service, hiveJob, null, resourceIds, ref jobCount, totalJobCount, configFilePlugin.Id, refreshableHiveExperiment.HiveExperiment.UseLocalPlugins, refreshableHiveExperiment.HiveExperiment.Id, refreshableHiveExperiment.Log, refreshableHiveExperiment.HiveExperiment.IsPrivileged);
    228228          }
    229229
     
    257257    /// <param name="parentHiveJob">shall be null if its the root job</param>
    258258    /// <param name="groups"></param>
    259     private void UploadJobWithChildren(IProgress progress, IHiveService service, HiveJob hiveJob, HiveJob parentHiveJob, IEnumerable<Guid> groups, ref int jobCount, int totalJobCount, Guid configPluginId, bool useLocalPlugins, Guid hiveExperimentId, ILog log) {
     259    private void UploadJobWithChildren(IProgress progress, IHiveService service, HiveJob hiveJob, HiveJob parentHiveJob, IEnumerable<Guid> groups, ref int jobCount, int totalJobCount, Guid configPluginId, bool useLocalPlugins, Guid hiveExperimentId, ILog log, bool isPrivileged) {
    260260      jobCount++;
    261261      progress.Status = string.Format("Serializing job {0} of {1}", jobCount, totalJobCount);
     
    263263      List<IPluginDescription> plugins;
    264264
    265       if (hiveJob.ItemJob.ComputeInParallel &&
    266         (hiveJob.ItemJob.Item is Optimization.Experiment || hiveJob.ItemJob.Item is Optimization.BatchRun)) {
     265      if (hiveJob.ItemJob.ComputeInParallel && (hiveJob.ItemJob.Item is Optimization.Experiment || hiveJob.ItemJob.Item is Optimization.BatchRun)) {
    267266        hiveJob.Job.IsParentJob = true;
    268267        hiveJob.Job.FinishWhenChildJobsFinished = true;
     
    279278      hiveJob.Job.PluginsNeededIds.Add(configPluginId);
    280279      hiveJob.Job.HiveExperimentId = hiveExperimentId;
     280      hiveJob.Job.IsPrivileged = isPrivileged;
    281281
    282282      progress.Status = string.Format("Uploading job {0} of {1} ({2} kb, {3} objects)", jobCount, totalJobCount, jobData.Data.Count() / 1024, hiveJob.ItemJob.GetObjectGraphObjects().Count());
     
    293293
    294294      foreach (HiveJob child in hiveJob.ChildHiveJobs) {
    295         UploadJobWithChildren(progress, service, child, hiveJob, groups, ref jobCount, totalJobCount, configPluginId, useLocalPlugins, hiveExperimentId, log);
     295        UploadJobWithChildren(progress, service, child, hiveJob, groups, ref jobCount, totalJobCount, configPluginId, useLocalPlugins, hiveExperimentId, log, isPrivileged);
    296296      }
    297297    }
Note: See TracChangeset for help on using the changeset viewer.