- Timestamp:
- 07/18/14 12:01:13 (10 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll 10 11 HeuristicLab 3.3.5.1.ReSharper.user 11 12 HeuristicLab 3.3.6.0.ReSharper.user 12 13 HeuristicLab.4.5.resharper.user 13 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 14 16 HeuristicLab.resharper.user 15 17 ProtoGen.exe … … 17 19 _ReSharper.HeuristicLab 18 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 19 22 _ReSharper.HeuristicLab.ExtLibs 20 23 bin 21 24 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive/3.3/TaskDownloader.cs
r9219 r11202 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.