Changeset 5707 for branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive
- Timestamp:
- 03/16/11 13:31:37 (13 years ago)
- Location:
- branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/HeuristicLab.Hive.Contracts-3.3.csproj
r5179 r5707 140 140 <Compile Include="BusinessObjects\SlaveGroupDtoList.cs" /> 141 141 <None Include="HeuristicLabHiveContractsPlugin.cs.frame" /> 142 <Compile Include="DisposableWrapper.cs" /> 142 143 <Compile Include="MessageContainerWithCallback.cs" /> 143 144 <Compile Include="MessageContainerWithJob.cs" /> -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/WcfServicePool.cs
r5588 r5707 58 58 } 59 59 60 public Disposable <T> GetService() {60 public DisposableWrapper<T> GetService() { 61 61 try { 62 62 if (!string.IsNullOrEmpty(userName) && !string.IsNullOrEmpty(password)) { 63 63 var factory = ClientFactory.CreateChannelFactory<T>(endpointName, hostAddress, userName, password); 64 return new Disposable<T>(factory.Obj.CreateChannel()); 64 var disposable = new DisposableWrapper<T>(factory.CreateChannel()); 65 disposable.OnDisposing += new EventHandler<EventArgs<object>>(disposable_OnDisposing); 66 return disposable; 65 67 } else { 66 68 var factory = ClientFactory.CreateChannelFactory<T>(endpointName, hostAddress); 67 return new Disposable<T>(factory.Obj.CreateChannel()); 69 var disposable = new DisposableWrapper<T>(factory.CreateChannel()); 70 disposable.OnDisposing += new EventHandler<EventArgs<object>>(disposable_OnDisposing); 71 return disposable; 68 72 } 69 73 } … … 81 85 } 82 86 } 87 88 private void disposable_OnDisposing(object sender, EventArgs<object> e) { 89 DisposeCommunicationObject((ICommunicationObject)e.Value); 90 } 91 92 public static void DisposeCommunicationObject(ICommunicationObject obj) { 93 if (obj != null) { 94 if (obj.State != CommunicationState.Faulted && obj.State != CommunicationState.Closed) { 95 try { obj.Close(); } 96 catch { obj.Abort(); } 97 } else { 98 obj.Abort(); 99 } 100 } 101 } 83 102 } 84 103 } -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HiveExperiment.cs
r5179 r5707 32 32 using HeuristicLab.Hive.ExperimentManager.Jobs; 33 33 using HeuristicLab.Hive.Tracing; 34 using HeuristicLab.Clients.Common;35 34 36 35 namespace HeuristicLab.Hive.ExperimentManager { … … 227 226 this.progress = new Progress("Connecting to server..."); 228 227 IsProgressing = true; 229 using (Disposable <IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {228 using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) { 230 229 IEnumerable<string> groups = ToResourceIdList(this.ResourceIds); 231 230 this.HiveJob.SetIndexInParentOptimizerList(null); … … 309 308 310 309 public void Stop() { 311 using (Disposable <IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {310 using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) { 312 311 foreach (HiveJob hj in HiveJob.GetAllHiveJobs()) { 313 312 service.Obj.AbortJob(hj.JobDto.Id); … … 537 536 538 537 progress.Status = "Connecting to Server..."; 539 using (Disposable <IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) {538 using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) { 540 539 progress.Status = "Downloading list of jobs..."; 541 540 allResults = service.Obj.GetChildJobResults(rootJobId.Value, true, true).Obj; … … 591 590 592 591 private OptimizerJob LoadOptimizerJob(Guid jobId) { 593 using (Disposable <IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {592 using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) { 594 593 ResponseObject<SerializedJob> serializedJob = service.Obj.GetLastSerializedResult(jobId); 595 594 try { -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HiveExperimentManager.cs
r5399 r5707 102 102 this.HiveExperiments = new HiveExperimentCollection(); 103 103 } 104 using (Disposable <IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) {104 using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) { 105 105 currentlyUpdating = true; 106 106 ResponseObject<HiveExperimentDtoList> response = service.Obj.GetHiveExperiments(); … … 151 151 void hiveExperiments_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<HiveExperiment> e) { 152 152 if (!currentlyUpdating) { 153 using (Disposable <IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) {153 using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) { 154 154 foreach (HiveExperiment item in e.Items) { 155 155 if (item.HiveExperimentId != Guid.Empty) { -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HiveJobDownloader.cs
r5329 r5707 2 2 using System.Collections.Generic; 3 3 using System.Linq; 4 using System.Text;5 using HeuristicLab.Hive.ExperimentManager.Jobs;6 4 using System.Threading; 7 5 using System.Threading.Tasks; 6 using HeuristicLab.Hive.Contracts; 8 7 using HeuristicLab.Hive.Contracts.BusinessObjects; 9 8 using HeuristicLab.Hive.Contracts.Interfaces; 10 using HeuristicLab.Clients.Common;11 9 12 10 namespace HeuristicLab.Hive.ExperimentManager { … … 79 77 try { 80 78 if (abort) return null; 81 using (Disposable <IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {79 using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) { 82 80 result = service.Obj.GetLastSerializedResult((Guid)jobId).Obj; 83 81 } -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/JobResultPoller.cs
r5399 r5707 27 27 using HeuristicLab.Hive.Contracts.Interfaces; 28 28 using HeuristicLab.Hive.Contracts.ResponseObjects; 29 using HeuristicLab.Clients.Common;30 29 31 30 namespace HeuristicLab.Hive.ExperimentManager { … … 102 101 repetitions--; 103 102 try { 104 using (Disposable <IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {103 using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) { 105 104 response = service.Obj.GetChildJobResults(hiveJob.JobDto.Id, true, true); 106 105 } -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/WcfService.cs
r5213 r5707 24 24 using System.IO; 25 25 using System.Runtime.Serialization.Formatters.Binary; 26 using System.ServiceModel;27 26 using HeuristicLab.Common; 28 27 using HeuristicLab.Hive.Contracts; … … 31 30 using HeuristicLab.Hive.Slave.Common; 32 31 using HeuristicLab.Hive.Slave.Communication.SlaveFacade; 32 using HeuristicLab.Hive.Tracing; 33 33 using HeuristicLab.PluginInfrastructure; 34 using HeuristicLab.Hive.Tracing;35 using HeuristicLab.Clients.Common;36 34 37 35 namespace HeuristicLab.Hive.Slave.Communication { … … 77 75 public void Connect(SlaveDto slaveInfo) { 78 76 RegisterServiceEvents(); 79 using (Disposable <SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {77 using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) { 80 78 try { 81 79 Logger.Debug("Starting the Connection Process"); … … 131 129 public event System.EventHandler<EventArgs<Exception>> GetJobFailed; 132 130 public void GetJobAsync(Guid guid) { 133 Disposable <SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService();131 DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService(); 134 132 Logger.Debug("STARTED: Fetching of Jobs from Server for Slave"); 135 133 service.Obj.BeginGetStreamedJob(guid, (ar => { … … 184 182 public event System.EventHandler<StoreFinishedJobResultCompletedEventArgs> GetFinishedJobResultCompleted; 185 183 public void GetFinishedJobResultAsync(Guid clientId, Guid jobId, byte[] result, TimeSpan executionTime, string exception, bool finished) { 186 Disposable <SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService();184 DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService(); 187 185 Logger.Debug("STARTED: Sending back the finished job results"); 188 186 Logger.Debug("Building stream"); … … 218 216 public event System.EventHandler<ProcessSnapshotCompletedEventArgs> ProcessSnapshotCompleted; 219 217 public void ProcessSnapshotAsync(Guid clientId, Guid jobId, byte[] result, TimeSpan executionTime, string exception, bool finished) { 220 Disposable <SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService();218 DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService(); 221 219 222 220 Stream stream = GetStreamedJobResult(clientId, jobId, result, executionTime, exception); … … 249 247 public event EventHandler<ProcessHeartBeatCompletedEventArgs> ProcessHeartBeatCompleted; 250 248 public void ProcessHeartBeatSync(HeartBeatData hbd) { 251 using (Disposable <SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.SlaveFacadePool.GetService()) {249 using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.SlaveFacadePool.GetService()) { 252 250 Logger.Debug("STARTING: sending heartbeat"); 253 251 var res = service.Obj.ProcessHeartBeat(hbd); … … 287 285 288 286 public ResponseResultReceived StoreFinishedJobResultsSync(Guid clientId, Guid jobId, byte[] result, TimeSpan executionTime, string exception, bool finished) { 289 using (Disposable <SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {287 using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) { 290 288 ResponseResultReceived res = service.Obj.StoreFinishedJobResultStreamed(GetStreamedJobResult(clientId, jobId, result, executionTime, exception)); 291 289 return res; … … 296 294 try { 297 295 Logger.Debug("STARTING: Sync call: IsJobStillNeeded"); 298 using (Disposable <SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {296 using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) { 299 297 Response res = service.Obj.IsJobStillNeeded(jobId); 300 298 Logger.Debug("ENDED: Sync call: IsJobStillNeeded"); … … 310 308 public ResponseResultReceived ProcessSnapshotSync(Guid clientId, Guid jobId, byte[] result, TimeSpan executionTime, string exception) { 311 309 try { 312 using (Disposable <SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {310 using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) { 313 311 return service.Obj.ProcessSnapshotStreamed(GetStreamedJobResult(clientId, jobId, result, executionTime, exception)); 314 312 } … … 322 320 public IEnumerable<CachedHivePluginInfoDto> RequestPlugins(List<HivePluginInfoDto> requestedPlugins) { 323 321 try { 324 using (Disposable <SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {322 using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) { 325 323 Logger.Debug("STARTED: Requesting Plugins for Job"); 326 324 Logger.Debug("STARTED: Getting the stream"); … … 345 343 try { 346 344 Logger.Debug("STARTED: Logout"); 347 using (Disposable <SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {345 using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) { 348 346 service.Obj.Logout(guid); 349 347 } … … 358 356 try { 359 357 Logger.Debug("STARTED: Syncing Calendars"); 360 using (Disposable <SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {358 using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) { 361 359 ResponseCalendar cal = service.Obj.GetCalendar(clientId); 362 360 Logger.Debug("ENDED: Syncing Calendars"); … … 373 371 try { 374 372 Logger.Debug("STARTED: Setting Calendar status to: " + state); 375 using (Disposable <SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {373 using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) { 376 374 Response resp = service.Obj.SetCalendarStatus(clientId, state); 377 375 Logger.Debug("ENDED: Setting Calendar status to: " + state); … … 388 386 try { 389 387 Logger.Debug("STARTED: Add Child Job for parent: " + parentJobId); 390 using (Disposable <SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {388 using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) { 391 389 ResponseObject<JobDto> response = service.Obj.AddChildJob(parentJobId, serializedJob); 392 390 Logger.Debug("ENDED: Add Child Job for parent: " + parentJobId); … … 403 401 try { 404 402 Logger.Debug("STARTED: Pausing job: " + serializedJob.JobInfo.Id); 405 using (Disposable <SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {403 using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) { 406 404 ResponseObject<JobDto> response = service.Obj.PauseJob(serializedJob); 407 405 Logger.Debug("ENDED: Pausing job: " + serializedJob.JobInfo.Id); … … 418 416 try { 419 417 Logger.Debug("STARTED: GetChildJobs job: " + parentJob); 420 using (Disposable <SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {418 using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) { 421 419 SerializedJobList serializedJobs = new SerializedJobList(); 422 420 JobResult[] results = service.Obj.GetChildJobResults(new Guid?(parentJob), false, false); … … 439 437 public void DeleteChildJobs(Guid jobId) { 440 438 try { 441 using (Disposable <SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {439 using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) { 442 440 service.Obj.DeleteChildJobs(jobId); 443 441 } … … 450 448 public HivePluginFile GetConfigurationFile() { 451 449 try { 452 using (Disposable <SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {450 using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) { 453 451 var response = service.Obj.GetConfigurationFile(); 454 452 return response.Obj; -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Console/3.3/LogServiceReader.cs
r5588 r5707 4 4 using System.Windows.Forms; 5 5 using HeuristicLab.Clients.Common; 6 using HeuristicLab.Hive.Contracts; 6 7 using HeuristicLab.Hive.Slave.Console.SlaveConsoleService; 8 using System.ServiceModel; 7 9 8 10 namespace HeuristicLab.Hive.Slave.Console { … … 24 26 private void timer_Tick(object sender, EventArgs e) { 25 27 try { 26 using (var factory = ClientFactory.CreateChannelFactory<ISlaveConsoleCommunicator>("SlaveConsoleTcpEndpointClient")) {28 using (var factory = new DisposableWrapper<ChannelFactory<ISlaveConsoleCommunicator>>(ClientFactory.CreateChannelFactory<ISlaveConsoleCommunicator>("SlaveConsoleTcpEndpointClient"))) { 27 29 var slaveClient = factory.Obj.CreateChannel(); 28 30 try { -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/Core.cs
r5153 r5707 365 365 Logger.Info("Received new job with id " + e.Result.Obj.Id); 366 366 Logger.Debug("Fetching plugins for job " + e.Result.Obj.Id); 367 367 368 368 String pluginDir = Path.Combine(PluginCache.Instance.PluginTempBaseDir, e.Result.Obj.Id.ToString()); 369 369 bool pluginsPrepared = false; -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/PluginCache.cs
r5037 r5707 24 24 using System.IO; 25 25 using System.Linq; 26 using System.Reflection; 26 27 using System.Runtime.CompilerServices; 28 using System.Threading; 27 29 using HeuristicLab.Hive.Contracts.BusinessObjects; 28 30 using HeuristicLab.Hive.Slave.Communication; 29 31 using HeuristicLab.PluginInfrastructure; 30 32 using HeuristicLab.PluginInfrastructure.Manager; 31 using System.Threading;32 using System.Reflection;33 33 34 34 namespace HeuristicLab.Hive.Slave.Core { … … 71 71 if (!Directory.Exists(PluginCacheDir)) { 72 72 Directory.CreateDirectory(PluginCacheDir); 73 string baseDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); 74 CopyPluginInfrastructureFiles(baseDir, PluginCacheDir); 73 75 } 74 76 pm.DiscoverAndCheckPlugins(); … … 104 106 // copy files from PluginInfrastructure, which are not declared 105 107 string baseDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); 106 CopyFile(baseDir, targetDir, "HeuristicLab.PluginInfrastructure-3.3.dll"); 107 CopyFile(baseDir, targetDir, "ICSharpCode.SharpZipLib.dll"); 108 CopyFile(baseDir, targetDir, "ICSharpCode.SharpZipLib License.txt"); 108 CopyPluginInfrastructureFiles(baseDir, targetDir); 109 109 110 110 // copy slave plugins, otherwise its not possible to register the UnhandledException handler to the appdomain 111 CopyFile(baseDir, targetDir, "HeuristicLab.Hive.Slave.Core-3.3.dll"); 112 CopyFile(baseDir, targetDir, "HeuristicLab.Hive.Slave.Common-3.3.dll"); 113 CopyFile(baseDir, targetDir, "HeuristicLab.Hive.Slave.Communication-3.3.dll"); 114 CopyFile(baseDir, targetDir, "HeuristicLab.Hive.Slave.ExecutionEngine-3.3.dll"); 115 } 111 CopySlaveFiles(baseDir, targetDir); 112 } 113 } 114 115 private void CopySlaveFiles(string sourceDir, String targetDir) { 116 CopyFile(sourceDir, targetDir, "HeuristicLab.Hive.Slave.Core-3.3.dll"); 117 CopyFile(sourceDir, targetDir, "HeuristicLab.Hive.Slave.Common-3.3.dll"); 118 CopyFile(sourceDir, targetDir, "HeuristicLab.Hive.Slave.Communication-3.3.dll"); 119 CopyFile(sourceDir, targetDir, "HeuristicLab.Hive.Slave.ExecutionEngine-3.3.dll"); 120 } 121 122 private void CopyPluginInfrastructureFiles(string sourceDir, String targetDir) { 123 CopyFile(sourceDir, targetDir, "HeuristicLab.PluginInfrastructure-3.3.dll"); 124 CopyFile(sourceDir, targetDir, "ICSharpCode.SharpZipLib.dll"); 125 CopyFile(sourceDir, targetDir, "ICSharpCode.SharpZipLib License.txt"); 116 126 } 117 127 -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.HiveEngine/3.3/HiveEngine.cs
r5399 r5707 2 2 using System.Collections.Generic; 3 3 using System.Linq; 4 using System.Text; 4 using System.Threading; 5 using System.Threading.Tasks; 6 using HeuristicLab.Common; 7 using HeuristicLab.Core; 8 using HeuristicLab.Hive.Contracts; 9 using HeuristicLab.Hive.Contracts.BusinessObjects; 10 using HeuristicLab.Hive.Contracts.Interfaces; 11 using HeuristicLab.Hive.Contracts.ResponseObjects; 12 using HeuristicLab.Hive.ExperimentManager; 5 13 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 6 using HeuristicLab.Core;7 using HeuristicLab.Common;8 using HeuristicLab.Hive.Contracts.Interfaces;9 using HeuristicLab.Clients.Common;10 using HeuristicLab.Hive.ExperimentManager;11 using HeuristicLab.Hive.Contracts.BusinessObjects;12 14 using HeuristicLab.PluginInfrastructure; 13 using HeuristicLab.Hive.Contracts.ResponseObjects;14 using System.Threading;15 using HeuristicLab.Random;16 using System.Threading.Tasks;17 15 18 16 namespace HeuristicLab.HiveEngine { … … 245 243 Thread.Sleep(10000); 246 244 try { 247 using (Disposable <IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) {245 using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) { 248 246 results = service.Obj.GetJobResults(remainingJobIds).Obj; 249 247 } … … 312 310 TryAndRepeat(() => { 313 311 LogMessage(string.Format("Deleting {0} jobs on hive.", jobIndices.Count)); 314 using (Disposable <IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) {312 using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) { 315 313 foreach (Guid jobId in jobIndices.Keys) { 316 314 service.Obj.DeleteJob(jobId); … … 359 357 cancellationToken.ThrowIfCancellationRequested(); 360 358 try { 361 using (Disposable <IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {359 using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) { 362 360 response = service.Obj.AddJobWithGroupStrings(serializedJob, groups); 363 361 serializedJob = null; … … 390 388 cancellationToken.ThrowIfCancellationRequested(); 391 389 try { 392 using (Disposable <IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {390 using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) { 393 391 serializedJob = service.Obj.GetLastSerializedResult(jobId).Obj; 394 392 }
Note: See TracChangeset
for help on using the changeset viewer.