Changeset 1589
- Timestamp:
- 04/17/09 12:20:19 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 added
- 1 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Client.Communication/3.2/WcfService.cs
r1579 r1589 253 253 } 254 254 255 public List<Cached Plugin> RequestPlugins(List<PluginInfo> requestedPlugins) {255 public List<CachedHivePluginInfo> RequestPlugins(List<PluginInfo> requestedPlugins) { 256 256 try { 257 257 return proxy.SendPlugins(requestedPlugins.ToArray()).Plugins; -
trunk/sources/HeuristicLab.Hive.Client.Core/3.2/Core.cs
r1530 r1589 229 229 230 230 void wcfService_StoreFinishedJobResultCompleted(object sender, StoreFinishedJobResultCompletedEventArgs e) { 231 if (e.Result.Success) { 232 lock(engines) { 233 //if the engine is running again -> we sent an snapshot. Otherwise the job was finished 234 //this method has a risk concerning race conditions. 235 //better expand the sendjobresultcompltedeventargs with a boolean "snapshot?" flag 231 lock(engines) { 232 try { 236 233 AppDomain.Unload(appDomains[e.Result.JobId]); 237 234 appDomains.Remove(e.Result.JobId); 238 235 engines.Remove(e.Result.JobId); 239 236 jobs.Remove(e.Result.JobId); 240 ClientStatusInfo.JobsProcessed++; 241 Debug.WriteLine("ProcessedJobs to:" + ClientStatusInfo.JobsProcessed); 242 } 237 } 238 catch (Exception ex) { 239 Logging.Instance.Error(this.ToString(), "Exception when unloading the appdomain: ", ex); 240 } 241 } 242 if (e.Result.Success) { 243 244 //if the engine is running again -> we sent an snapshot. Otherwise the job was finished 245 //this method has a risk concerning race conditions. 246 //better expand the sendjobresultcompltedeventargs with a boolean "snapshot?" flag 247 248 ClientStatusInfo.JobsProcessed++; 249 Debug.WriteLine("ProcessedJobs to:" + ClientStatusInfo.JobsProcessed); 243 250 } else { 244 Logging.Instance.Error(this.ToString(), "Sending of job " + e.Result.JobId + " failed ");251 Logging.Instance.Error(this.ToString(), "Sending of job " + e.Result.JobId + " failed, job has been wasted. Message: " + e.Result.StatusMessage); 245 252 } 246 253 } 247 254 248 255 void wcfService_ProcessSnapshotCompleted(object sender, ProcessSnapshotCompletedEventArgs e) { 249 Logging.Instance.Info(this.ToString(), "Snapshot " + e.Result.JobId + " has been transmitted according to plan ");256 Logging.Instance.Info(this.ToString(), "Snapshot " + e.Result.JobId + " has been transmitted according to plan."); 250 257 } 251 258 -
trunk/sources/HeuristicLab.Hive.Client.Core/3.2/PluginCache.cs
r1530 r1589 9 9 namespace HeuristicLab.Hive.Client.Core { 10 10 public class PluginCache { 11 private List<Cached Plugin> pluginCache;11 private List<CachedHivePluginInfo> pluginCache; 12 12 13 13 public PluginCache() { 14 pluginCache = new List<Cached Plugin>();14 pluginCache = new List<CachedHivePluginInfo>(); 15 15 } 16 16 17 public void AddPlugin(Cached Pluginplugin) {17 public void AddPlugin(CachedHivePluginInfo plugin) { 18 18 pluginCache.Add(plugin); 19 19 } 20 20 21 public List<Cached Plugin> GetPlugins(List<PluginInfo> requests) {22 List<Cached Plugin> neededPlugins = new List<CachedPlugin>();21 public List<CachedHivePluginInfo> GetPlugins(List<PluginInfo> requests) { 22 List<CachedHivePluginInfo> neededPlugins = new List<CachedHivePluginInfo>(); 23 23 List<PluginInfo> missingPlugins = new List<PluginInfo>(); 24 24 bool found = false; 25 25 foreach (PluginInfo info in requests) { 26 foreach (Cached Plugincache in pluginCache) {26 foreach (CachedHivePluginInfo cache in pluginCache) { 27 27 if (info.Equals(cache)) { 28 28 neededPlugins.Add(cache); … … 36 36 } 37 37 38 List<Cached Plugin> receivedPlugins = WcfService.Instance.RequestPlugins(missingPlugins);38 List<CachedHivePluginInfo> receivedPlugins = WcfService.Instance.RequestPlugins(missingPlugins); 39 39 if (receivedPlugins != null) { 40 40 neededPlugins.AddRange(receivedPlugins); -
trunk/sources/HeuristicLab.Hive.Contracts/3.2/HeuristicLab.Hive.Contracts-3.2.csproj
r1580 r1589 87 87 <ItemGroup> 88 88 <Compile Include="ApplicationConstants.cs" /> 89 <Compile Include="BusinessObjects\CachedPlugin.cs" /> 89 90 <Compile Include="BusinessObjects\ClientGroup.cs" /> 90 91 <Compile Include="BusinessObjects\HivePluginInfo.cs" /> -
trunk/sources/HeuristicLab.Hive.Contracts/3.2/ResponsePlugin.cs
r1530 r1589 11 11 public class ResponsePlugin : Response { 12 12 [DataMember] 13 public List<Cached Plugin> Plugins { get; set; }13 public List<CachedHivePluginInfo> Plugins { get; set; } 14 14 } 15 15 } -
trunk/sources/HeuristicLab.Hive.Engine/3.2/HeuristicLab.Hive.Engine-3.2.csproj
r1579 r1589 4 4 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 5 5 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 6 <ProductVersion>9.0. 21022</ProductVersion>6 <ProductVersion>9.0.30729</ProductVersion> 7 7 <SchemaVersion>2.0</SchemaVersion> 8 8 <ProjectGuid>{C8FEDAC1-0326-4293-B585-F0FEDDEDFC11}</ProjectGuid> -
trunk/sources/HeuristicLab.Hive.Engine/3.2/HiveEngine.cs
r1580 r1589 93 93 pluginInfo.BuildDate = info.BuildDate.ToString(); 94 94 95 96 95 97 pluginsNeeded.Add(pluginInfo); 96 98 } -
trunk/sources/HeuristicLab.Hive.JobBase/3.2/TestJob.cs
r1530 r1589 37 37 38 38 public override void Run() { 39 int max = 10 ;39 int max = 100; 40 40 while(runValue < max && abort == false) { 41 41 //for (int y = 0; y < Int32.MaxValue; y++) ; -
trunk/sources/HeuristicLab.PluginInfrastructure/HeuristicLab.PluginInfrastructure.csproj
r1474 r1589 86 86 <Compile Include="BaseClasses\ApplicationBase.cs" /> 87 87 <Compile Include="BaseClasses\PluginBase.cs" /> 88 <Compile Include="CachedPlugin.cs" />89 88 <Compile Include="ClassInfoAttribute.cs" /> 90 89 <Compile Include="Interfaces\IApplication.cs" />
Note: See TracChangeset
for help on using the changeset viewer.