- Timestamp:
- 11/25/10 15:24:35 (14 years ago)
- Location:
- branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/Core.cs
r4921 r4936 369 369 370 370 Logger.Debug("Plugins fetched for job " + e.Result.Obj.Id); 371 String pluginDir = Path.Combine(PluginCache.Instance.Plugin RepositoryDir, e.Result.Obj.Id.ToString());371 String pluginDir = Path.Combine(PluginCache.Instance.PluginTempBaseDir, e.Result.Obj.Id.ToString()); 372 372 373 373 AppDomain appDomain = HeuristicLab.PluginInfrastructure.Sandboxing.SandboxManager.CreateAndInitSandbox(pluginDir); -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/PluginCache.cs
r4921 r4936 37 37 private static PluginCache instance = null; 38 38 39 public string PluginRepositoryDir { get; set; } 39 public string PluginCacheDir { get; set; } 40 public string PluginTempBaseDir { get; set; } 40 41 41 42 private List<PluginDescription> cachedPlugins = new List<PluginDescription>(); … … 52 53 53 54 public PluginCache() { 54 PluginRepositoryDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "plugins"); 55 PluginCacheDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "PluginCache"); 56 PluginTempBaseDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "PluginTemp"); 55 57 56 this.pm = new PluginManager(Plugin RepositoryDir);58 this.pm = new PluginManager(PluginCacheDir); 57 59 DoUpdateRun(); 58 60 } 59 61 60 62 private void DoUpdateRun() { 61 if (!Directory.Exists(Plugin RepositoryDir)) {62 Directory.CreateDirectory(Plugin RepositoryDir);63 if (!Directory.Exists(PluginCacheDir)) { 64 Directory.CreateDirectory(PluginCacheDir); 63 65 } 64 66 pm.DiscoverAndCheckPlugins(); … … 68 70 [MethodImpl(MethodImplOptions.Synchronized)] 69 71 public void CopyPluginsForJob(List<HivePluginInfoDto> requests, Guid jobId) { 70 String targetDir = Path.Combine(Plugin RepositoryDir, jobId.ToString());72 String targetDir = Path.Combine(PluginTempBaseDir, jobId.ToString()); 71 73 72 74 if (Directory.Exists(targetDir)) { … … 141 143 foreach (HivePluginFile pf in updateablePlugin.PluginFiles) { 142 144 Logger.Debug(string.Format("writing {0}", Path.GetFileName(pf.Name))); 143 File.WriteAllBytes(Path.Combine(Plugin RepositoryDir, Path.GetFileName(pf.Name)), pf.BinaryFile);145 File.WriteAllBytes(Path.Combine(PluginCacheDir, Path.GetFileName(pf.Name)), pf.BinaryFile); 144 146 } 145 147 } … … 150 152 try { 151 153 Logger.Debug("unloading..."); 152 Directory.Delete(Path.Combine(Plugin RepositoryDir, id.ToString()), true);154 Directory.Delete(Path.Combine(PluginTempBaseDir, id.ToString()), true); 153 155 } 154 156 catch (Exception ex) {
Note: See TracChangeset
for help on using the changeset viewer.