Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/02/15 13:16:18 (9 years ago)
Author:
gkronber
Message:

#2434 merged r12878:12927 from trunk to branch (hive changes)

Location:
branches/crossvalidation-2434
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/crossvalidation-2434

  • branches/crossvalidation-2434/HeuristicLab.Clients.Hive/3.3/HiveClient.cs

    r12579 r12931  
    6868      set { alreadyUploadedPlugins = value; }
    6969    }
    70 
    71     private bool isAllowedPrivileged;
    72     public bool IsAllowedPrivileged {
    73       get { return isAllowedPrivileged; }
    74       set { isAllowedPrivileged = value; }
    75     }
    7670    #endregion
    7771
     
    9993
    10094      try {
    101         IsAllowedPrivileged = HiveServiceLocator.Instance.CallHiveService((s) => s.IsAllowedPrivileged());
    102 
    10395        jobs = new HiveItemCollection<RefreshableJob>();
    10496        var jobsLoaded = HiveServiceLocator.Instance.CallHiveService<IEnumerable<Job>>(s => s.GetJobs());
     
    275267        refreshableJob.Progress.Status = "Uploading Job...";
    276268        refreshableJob.Job.Id = HiveServiceLocator.Instance.CallHiveService((s) => s.AddJob(refreshableJob.Job));
    277         bool isPrivileged = refreshableJob.Job.IsPrivileged;
    278269        refreshableJob.Job = HiveServiceLocator.Instance.CallHiveService((s) => s.GetJob(refreshableJob.Job.Id)); // update owner and permissions
    279         refreshableJob.Job.IsPrivileged = isPrivileged;
    280270        cancellationToken.ThrowIfCancellationRequested();
    281271
     
    298288        foreach (HiveTask hiveTask in refreshableJob.HiveTasks) {
    299289          var task = TS.Task.Factory.StartNew((hj) => {
    300             UploadTaskWithChildren(refreshableJob.Progress, (HiveTask)hj, null, resourceIds, jobCount, totalJobCount, configFilePlugin.Id, refreshableJob.Job.Id, refreshableJob.Log, refreshableJob.Job.IsPrivileged, cancellationToken);
     290            UploadTaskWithChildren(refreshableJob.Progress, (HiveTask)hj, null, resourceIds, jobCount, totalJobCount, configFilePlugin.Id, refreshableJob.Job.Id, refreshableJob.Log, cancellationToken);
    301291          }, hiveTask);
    302292          task.ContinueWith((x) => refreshableJob.Log.LogException(x.Exception), TaskContinuationOptions.OnlyOnFaulted);
     
    343333    /// </summary>
    344334    /// <param name="parentHiveTask">shall be null if its the root task</param>
    345     private void UploadTaskWithChildren(IProgress progress, HiveTask hiveTask, HiveTask parentHiveTask, IEnumerable<Guid> groups, int[] taskCount, int totalJobCount, Guid configPluginId, Guid jobId, ILog log, bool isPrivileged, CancellationToken cancellationToken) {
     335    private void UploadTaskWithChildren(IProgress progress, HiveTask hiveTask, HiveTask parentHiveTask, IEnumerable<Guid> groups, int[] taskCount, int totalJobCount, Guid configPluginId, Guid jobId, ILog log, CancellationToken cancellationToken) {
    346336      taskUploadSemaphore.WaitOne();
    347337      bool semaphoreReleased = false;
     
    375365        hiveTask.Task.PluginsNeededIds.Add(configPluginId);
    376366        hiveTask.Task.JobId = jobId;
    377         hiveTask.Task.IsPrivileged = isPrivileged;
    378367
    379368        log.LogMessage(string.Format("Uploading task ({0} kb, {1} objects)", taskData.Data.Count() / 1024, hiveTask.ItemTask.GetObjectGraphObjects().Count()));
     
    398387          var task = TS.Task.Factory.StartNew((tuple) => {
    399388            var arguments = (Tuple<HiveTask, HiveTask>)tuple;
    400             UploadTaskWithChildren(progress, arguments.Item1, arguments.Item2, groups, taskCount, totalJobCount, configPluginId, jobId, log, isPrivileged, cancellationToken);
     389            UploadTaskWithChildren(progress, arguments.Item1, arguments.Item2, groups, taskCount, totalJobCount, configPluginId, jobId, log, cancellationToken);
    401390          }, new Tuple<HiveTask, HiveTask>(child, hiveTask));
    402391          task.ContinueWith((x) => log.LogException(x.Exception), TaskContinuationOptions.OnlyOnFaulted);
     
    442431        IDictionary<Guid, HiveTask> allHiveTasks = downloader.Results;
    443432        var parents = allHiveTasks.Values.Where(x => !x.Task.ParentTaskId.HasValue);
    444         refreshableJob.Job.IsPrivileged = allHiveTasks.Any(x => x.Value.Task.IsPrivileged);
    445433
    446434        refreshableJob.Progress.Status = "Downloading/deserializing complete. Displaying tasks...";
  • branches/crossvalidation-2434/HeuristicLab.Clients.Hive/3.3/ServiceClients/HiveServiceClient.cs

    r9219 r12931  
    351351       
    352352        [System.Runtime.Serialization.OptionalFieldAttribute()]
    353         private bool IsPrivilegedField;
    354        
    355         [System.Runtime.Serialization.OptionalFieldAttribute()]
    356353        private System.Guid JobIdField;
    357354       
     
    415412                    this.IsParentTaskField = value;
    416413                    this.RaisePropertyChanged("IsParentTask");
    417                 }
    418             }
    419         }
    420        
    421         [System.Runtime.Serialization.DataMemberAttribute()]
    422         public bool IsPrivileged
    423         {
    424             get
    425             {
    426                 return this.IsPrivilegedField;
    427             }
    428             set
    429             {
    430                 if ((this.IsPrivilegedField.Equals(value) != true))
    431                 {
    432                     this.IsPrivilegedField = value;
    433                     this.RaisePropertyChanged("IsPrivileged");
    434414                }
    435415            }
     
    25532533        System.Collections.Generic.List<HeuristicLab.Clients.Hive.JobPermission> GetJobPermissions(System.Guid jobId);
    25542534       
    2555         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/IsAllowedPrivileged", ReplyAction="http://tempuri.org/IHiveService/IsAllowedPrivilegedResponse")]
    2556         bool IsAllowedPrivileged();
    2557        
    25582535        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/Hello", ReplyAction="http://tempuri.org/IHiveService/HelloResponse")]
    25592536        void Hello(HeuristicLab.Clients.Hive.Slave slave);
     
    28822859        }
    28832860       
    2884         public bool IsAllowedPrivileged()
    2885         {
    2886             return base.Channel.IsAllowedPrivileged();
    2887         }
    2888        
    28892861        public void Hello(HeuristicLab.Clients.Hive.Slave slave)
    28902862        {
  • branches/crossvalidation-2434/HeuristicLab.Clients.Hive/3.3/ServiceClients/Job.cs

    r12012 r12931  
    2727  public partial class Job : IDeepCloneable, IContent {
    2828
    29     private bool isPrivileged;
    30     public bool IsPrivileged {
    31       get { return isPrivileged; }
    32       set { isPrivileged = value; }
    33     }
    34 
    3529    #region Constructors and Cloning
    3630    public Job() {
     
    4842      this.Description = original.Description;
    4943      this.Id = original.Id;
    50       this.IsPrivileged = original.IsPrivileged;
    5144      this.Permission = original.Permission;
    5245    }
  • branches/crossvalidation-2434/HeuristicLab.Clients.Hive/3.3/ServiceClients/Task.cs

    r12012 r12931  
    4343      this.FinishWhenChildJobsFinished = original.FinishWhenChildJobsFinished;
    4444      this.JobId = original.JobId;
    45       this.IsPrivileged = original.IsPrivileged;
    4645    }
    4746
Note: See TracChangeset for help on using the changeset viewer.