- Timestamp:
- 07/18/14 13:34:37 (10 years ago)
- Location:
- branches/HiveStatistics/sources/HeuristicLab.Clients.Hive
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/trunk/sources/HeuristicLab.Clients.Hive merged eligible /branches/Algorithms.GradientDescent/HeuristicLab.Clients.Hive 5516-5520 /branches/Benchmarking/sources/HeuristicLab.Clients.Hive 6917-7005 /branches/CloningRefactoring/HeuristicLab.Clients.Hive 4656-4721 /branches/DataAnalysis Refactoring/HeuristicLab.Clients.Hive 5471-5808 /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Clients.Hive 5815-6180 /branches/DataAnalysis/HeuristicLab.Clients.Hive 4458-4459,4462,4464 /branches/GP.Grammar.Editor/HeuristicLab.Clients.Hive 6284-6795 /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Clients.Hive 5060 /branches/NET40/sources/HeuristicLab.Clients.Hive 5138-5162 /branches/ParallelEngine/HeuristicLab.Clients.Hive 5175-5192 /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Clients.Hive 7568-7810 /branches/QAPAlgorithms/HeuristicLab.Clients.Hive 6350-6627 /branches/Restructure trunk solution/HeuristicLab.Clients.Hive 6828 /branches/RuntimeOptimizer/HeuristicLab.Clients.Hive 8943-9078 /branches/ScatterSearch (trunk integration)/HeuristicLab.Clients.Hive 7787-8333 /branches/SlaveShutdown/HeuristicLab.Clients.Hive 8944-8956 /branches/SuccessProgressAnalysis/HeuristicLab.Clients.Hive 5370-5682 /branches/Trunk/HeuristicLab.Clients.Hive 6829-6865 /branches/UnloadJobs/HeuristicLab.Clients.Hive 9168-9215 /branches/VNS/HeuristicLab.Clients.Hive 5594-5752 /branches/histogram/HeuristicLab.Clients.Hive 5959-6341
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive/3.3/TaskDownloader.cs
r11203 r11204 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 24 24 using System.Linq; 25 25 using System.Threading; 26 using HeuristicLab.Clients.Hive.Jobs;27 26 using HeuristicLab.Common; 28 27 … … 79 78 80 79 public TaskDownloader(IEnumerable<Guid> jobIds) { 81 t his.taskIds = jobIds;82 t his.taskDownloader = new ConcurrentTaskDownloader<ItemTask>(Settings.Default.MaxParallelDownloads, Settings.Default.MaxParallelDownloads);83 t his.taskDownloader.ExceptionOccured += new EventHandler<EventArgs<Exception>>(taskDownloader_ExceptionOccured);84 this.results = new Dictionary<Guid, HiveTask>();80 taskIds = jobIds; 81 taskDownloader = new ConcurrentTaskDownloader<ItemTask>(Settings.Default.MaxParallelDownloads, Settings.Default.MaxParallelDownloads); 82 taskDownloader.ExceptionOccured += new EventHandler<EventArgs<Exception>>(taskDownloader_ExceptionOccured); 83 results = new Dictionary<Guid, HiveTask>(); 85 84 } 86 85 … … 88 87 foreach (Guid taskId in taskIds) { 89 88 taskDownloader.DownloadTaskDataAndTask(taskId, 90 (localJob, itemJob) => { 91 if (localJob != null && itemJob != null) { 92 HiveTask hiveTask; 93 if (itemJob is OptimizerTask) { 94 hiveTask = new OptimizerHiveTask((OptimizerTask)itemJob); 95 } else { 96 hiveTask = new HiveTask(itemJob, true); 97 } 98 hiveTask.Task = localJob; 89 (localTask, itemTask) => { 90 if (localTask != null && itemTask != null) { 91 HiveTask hiveTask = itemTask.CreateHiveTask(); 92 hiveTask.Task = localTask; 99 93 try { 100 94 resultsLock.EnterWriteLock(); 101 this.results.Add(localJob.Id, hiveTask);95 results.Add(localTask.Id, hiveTask); 102 96 } 103 97 finally { resultsLock.ExitWriteLock(); } … … 113 107 public event EventHandler<EventArgs<Exception>> ExceptionOccured; 114 108 private void OnExceptionOccured(Exception exception) { 115 this.exceptionOccured = true;116 this.currentException = exception;109 exceptionOccured = true; 110 currentException = exception; 117 111 var handler = ExceptionOccured; 118 112 if (handler != null) handler(this, new EventArgs<Exception>(exception));
Note: See TracChangeset
for help on using the changeset viewer.