Changeset 15121 for trunk/sources
- Timestamp:
- 07/05/17 14:03:03 (7 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Clients.Hive.Views/3.3/HiveTasks/OptimizerHiveTaskView.cs
r14901 r15121 119 119 base.SetEnabledStateOfControls(); 120 120 121 this.startButton.Enabled = Content != null && Content.IsControllable && !Content.Task.Command.HasValue && (Content.Task.State == TaskState.Paused || Content.Task.State == TaskState.Failed || Content.Task.State == TaskState.Aborted);121 this.startButton.Enabled = Content != null && Content.IsControllable && !Content.Task.Command.HasValue && (Content.Task.State == TaskState.Paused); 122 122 this.pauseButton.Enabled = Content != null && Content.IsControllable && !Content.Task.Command.HasValue && Content.Task.State == TaskState.Calculating; 123 123 this.stopButton.Enabled = Content != null && Content.IsControllable && !Content.Task.Command.HasValue && (Content.Task.State == TaskState.Calculating || Content.Task.State == TaskState.Waiting || Content.Task.State == TaskState.Paused); -
trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveTasks/OptimizerHiveTask.cs
r14185 r15121 316 316 public override void AddChildHiveTask(HiveTask hiveTask) { 317 317 base.AddChildHiveTask(hiveTask); 318 var optimizerHive Job= (OptimizerHiveTask)hiveTask;318 var optimizerHiveTask = (OptimizerHiveTask)hiveTask; 319 319 syncTasksWithOptimizers = false; 320 if (this.ItemTask != null && optimizerHiveJob.ItemTask != null) { 321 // if task is in state Paused, it has to preserve its ResultCollection, which is cleared when a optimizer is added to an experiment 322 OptimizerTask optimizerJobClone = null; 323 if (optimizerHiveJob.Task.State == TaskState.Paused) { 324 optimizerJobClone = (OptimizerTask)optimizerHiveJob.ItemTask.Clone(); 325 } 320 if (this.ItemTask != null && optimizerHiveTask.ItemTask != null) { 321 OptimizerTask optimizerTaskClone = (OptimizerTask)optimizerHiveTask.ItemTask.Clone(); 326 322 327 323 if (this.ItemTask.Item is Optimization.Experiment) { 328 if (!this.ItemTask.OptimizerAsExperiment.Optimizers.Contains(optimizerHive Job.ItemTask.Item)) {329 UpdateOptimizerInExperiment(this.ItemTask.OptimizerAsExperiment, optimizerHive Job.ItemTask);324 if (!this.ItemTask.OptimizerAsExperiment.Optimizers.Contains(optimizerHiveTask.ItemTask.Item)) { 325 UpdateOptimizerInExperiment(this.ItemTask.OptimizerAsExperiment, optimizerHiveTask.ItemTask); 330 326 } 331 327 } else if (this.ItemTask.Item is Optimization.BatchRun) { 332 UpdateOptimizerInBatchRun(this.ItemTask.OptimizerAsBatchRun, optimizerHive Job.ItemTask);333 } 334 335 if (optimizerHiveJob.Task.State == TaskState.Paused) {336 optimizerHiveJob.ItemTask = optimizerJobClone;337 }328 UpdateOptimizerInBatchRun(this.ItemTask.OptimizerAsBatchRun, optimizerHiveTask.ItemTask); 329 } 330 331 optimizerHiveTask.syncTasksWithOptimizers = false; 332 optimizerHiveTask.ItemTask = optimizerTaskClone; 333 optimizerHiveTask.syncTasksWithOptimizers = true; 338 334 } 339 335 syncTasksWithOptimizers = true; -
trunk/sources/HeuristicLab.Services.Hive/3.3/HiveService.cs
r14901 r15121 263 263 if (task.State == DA.TaskState.Calculating || task.State == DA.TaskState.Transferring) { 264 264 task.Command = DA.Command.Pause; 265 } else if (task.State != DA.TaskState.Aborted 265 } else if (task.State != DA.TaskState.Paused 266 && task.State != DA.TaskState.Aborted 266 267 && task.State != DA.TaskState.Finished 267 268 && task.State != DA.TaskState.Failed) { … … 966 967 var taskStateEntity = taskState.ToEntity(); 967 968 968 if (task StateEntity == DA.TaskState.Paused && task.Command == null) {969 if (task.State == DA.TaskState.Calculating && taskStateEntity == DA.TaskState.Paused && task.Command == null) { 969 970 // slave paused and uploaded the task (no user-command) -> set waiting. 970 971 taskStateEntity = DA.TaskState.Waiting;
Note: See TracChangeset
for help on using the changeset viewer.