Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/30/10 15:58:33 (13 years ago)
Author:
cneumuel
Message:

#1260

  • custom configuration file is now deployed on slaves
  • made plugin distribution process more robust
  • fixed bug: slave assemblies are required in each sandbox appdomain
  • cleaned up some configuration elements in slave console client
  • fixed wrong path for locally persisted jobs
Location:
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/SlaveFacade.cs

    r4424 r5000  
    225225    }
    226226
     227    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
     228    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Slave)]
     229    public ResponseObject<HivePluginFile> GetConfigurationFile() {
     230      return slaveCommunicator.GetConfigurationFile();
     231    }
     232
    227233    #endregion
    228234  }
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/LifecycleManager.cs

    r4810 r5000  
    3030namespace HeuristicLab.Hive.Server.Core {
    3131  class LifecycleManager : ILifecycleManager {
     32    private readonly string pluginDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data\\Plugins");
    3233    private AutoResetEvent waitHandle;
    3334    private Thread thread;
     
    5758    }
    5859
     60    private byte[] configurationFile;
     61    public byte[] ConfigurationFile {
     62      get {
     63        if (configurationFile == null) {
     64          configurationFile = File.ReadAllBytes(Path.Combine(pluginDir, "HeuristicLab 3.3.exe.config"));
     65        }
     66        return configurationFile;
     67      }
     68    }
     69
    5970    #region ILifecycleManager Members
    6071
     
    6980
    7081    private void LoadPlugins() {
    71       pm = new PluginManager(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data\\Plugins"));
     82      pm = new PluginManager(pluginDir);
    7283      pm.DiscoverAndCheckPlugins();
    7384      pm.InitializeLifetimeService();
     
    115126
    116127    #endregion
    117 
    118 
    119128  }
    120129}
  • branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/SlaveCommunicator.cs

    r4914 r5000  
    571571        //jobStream.Close();
    572572
    573         DaoLocator.JobDao.SetBinaryJobFile(result.Id, serializedJob.ToArray());
     573        if (serializedJob.Count > 0) {
     574          DaoLocator.JobDao.SetBinaryJobFile(result.Id, serializedJob.ToArray());
     575        }
    574576      }
    575577      Logger.Info("END Job received for Storage:");
     
    662664
    663665      job.SerializedJobData = result;
    664 
     666     
    665667      DaoLocator.JobDao.Update(job.JobInfo);
    666668
     
    760762          pd.Version.Major == pluginInfo.Version.Major &&
    761763          pd.Version.Minor == pluginInfo.Version.Minor &&
    762           pd.Version.Revision >= pluginInfo.Version.Revision &&
    763           pd.Version.MinorRevision >= pluginInfo.Version.MinorRevision).SingleOrDefault();
     764          pd.Version.Build >= pluginInfo.Version.Build).SingleOrDefault(); // ignore revision here, otherwise each client who uses a more recent trunk-build than the server-build will not be able to execute the job
    764765        if (ipd != null) {
    765766          response.List.Add(ConvertPluginDescriptorToDto(ipd));
     
    788789    }
    789790
     791    public ResponseObject<HivePluginFile> GetConfigurationFile() {
     792      var response = new ResponseObject<HivePluginFile>();
     793      response.Obj = new HivePluginFile(lifecycleManager.ConfigurationFile, "Sandbox.config");
     794      return response;
     795    }
     796
    790797    #endregion
    791798  }
Note: See TracChangeset for help on using the changeset viewer.