- Timestamp:
- 01/07/12 02:07:44 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveHiveEngine/HeuristicLab.Clients.Hive/3.3/HiveClient.cs
r7285 r7287 29 29 using HeuristicLab.Common; 30 30 using HeuristicLab.Core; 31 using HeuristicLab.Optimization; 31 32 using HeuristicLab.PluginInfrastructure; 32 33 using TS = System.Threading.Tasks; … … 315 316 finally { 316 317 refreshableJob.IsProgressing = false; 318 refreshableJob.Progress.Finish(); 317 319 } 318 320 } … … 364 366 taskData = hiveTask.GetAsTaskData(true, out plugins); 365 367 } else { 366 hiveTask.Task.IsParentTask = false; 368 if (hiveTask.ItemTask.Item is EngineAlgorithm && ((EngineAlgorithm)hiveTask.ItemTask.Item).Engine is IHiveEngine) { 369 hiveTask.Task.IsParentTask = true; 370 //TODO: this is a little hack so that this task does not get executed immediately because the taskdata will be uploaded twice 371 hiveTask.Task.State = TaskState.Aborted; 372 } else { 373 hiveTask.Task.IsParentTask = false; 374 } 375 367 376 hiveTask.Task.FinishWhenChildJobsFinished = false; 368 377 taskData = hiveTask.GetAsTaskData(false, out plugins); … … 389 398 } else { 390 399 hiveTask.Task.Id = HiveServiceLocator.Instance.CallHiveService((s) => s.AddTask(hiveTask.Task, taskData, groups.ToList())); 400 401 if (hiveTask.Task.State == TaskState.Aborted) { 402 //TODO: this is a very bad hack 403 if (hiveTask.ItemTask.Item is EngineAlgorithm && ((EngineAlgorithm)hiveTask.ItemTask.Item).Engine is IHiveEngine) { 404 IHiveEngine he = ((EngineAlgorithm)hiveTask.ItemTask.Item).Engine as IHiveEngine; 405 he.ParentTaskId = hiveTask.Task.Id; 406 taskData = hiveTask.GetAsTaskData(false, out plugins); 407 taskData.TaskId = hiveTask.Task.Id; 408 409 Task t = HiveServiceLocator.Instance.CallHiveService((s) => s.GetTask(hiveTask.Task.Id)); 410 t.State = TaskState.Waiting; 411 HiveServiceLocator.Instance.CallHiveService((s) => s.UpdateTaskData(t, taskData)); 412 } 413 } 414 391 415 } 392 416 }
Note: See TracChangeset
for help on using the changeset viewer.