- Timestamp:
- 05/02/11 19:07:24 (13 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs
r6100 r6101 79 79 slaveComm = new ServiceHost(typeof(SlaveCommunicationService)); 80 80 slaveComm.Open(); 81 82 81 clientCom = SlaveClientCom.Instance.ClientCom; 82 83 // delete all left over job directories 84 PluginCache.Instance.CleanPluginTemp(); 83 85 clientCom.LogMessage("Hive Slave started"); 84 86 … … 483 485 AppDomain appDomain = HeuristicLab.PluginInfrastructure.Sandboxing.SandboxManager.CreateAndInitSandbox(myJob.Id.ToString(), pluginDir, Path.Combine(pluginDir, configFileName)); 484 486 appDomain.UnhandledException += new UnhandledExceptionEventHandler(AppDomain_UnhandledException); 487 Executor engine; 485 488 lock (engines) { 486 489 appDomains.Add(myJob.Id, appDomain); 487 490 clientCom.LogMessage("Creating AppDomain"); 488 Executorengine = (Executor)appDomain.CreateInstanceAndUnwrap(typeof(Executor).Assembly.GetName().Name, typeof(Executor).FullName);491 engine = (Executor)appDomain.CreateInstanceAndUnwrap(typeof(Executor).Assembly.GetName().Name, typeof(Executor).FullName); 489 492 clientCom.LogMessage("Created AppDomain"); 490 493 engine.JobId = myJob.Id; … … 492 495 clientCom.LogMessage("Starting Engine for job " + myJob.Id); 493 496 engines.Add(myJob.Id, engine); 494 engine.Start(jobData.Data);495 497 } 496 498 engine.Start(jobData.Data); 497 499 } 498 500 catch (Exception exception) { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/PluginCache.cs
r6008 r6101 231 231 232 232 /// <summary> 233 /// Checks the PluginTemp directory for orphaned directories and deletes them. 234 /// This should be only called if no jobs are currently running. 235 /// </summary> 236 public void CleanPluginTemp() { 237 if (Directory.Exists(PluginTempBaseDir)) { 238 foreach (string dir in Directory.EnumerateDirectories(PluginTempBaseDir)) { 239 try { 240 SlaveClientCom.Instance.ClientCom.LogMessage("Deleting orphaned directory " + dir); 241 Directory.Delete(dir, true); 242 } 243 catch (Exception ex) { 244 SlaveClientCom.Instance.ClientCom.LogMessage("Error cleaning up PluginTemp directory " + dir + ": " + ex.ToString()); 245 } 246 } 247 } 248 } 249 250 /// <summary> 233 251 /// checks the pluginCacheDirectory and deletes plugin folders which are not used anymore 234 /// </summary> 235 /// <param name="path"></param> 252 /// </summary> 236 253 private void CleanPluginCache() { 237 254 FileStream fs = null;
Note: See TracChangeset
for help on using the changeset viewer.