Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/11/11 20:57:29 (13 years ago)
Author:
ascheibe
Message:

#1233

  • fix pause/stop bug when serializing big experiments
  • use proper newlines
  • use GetPlugin(..) instead of GetPlugins()
Location:
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/ConfigManager.cs

    r5790 r6004  
    103103        foreach (KeyValuePair<Guid, Executor> kvp in engines) {
    104104          Executor e = kvp.Value;
    105           prog[e.JobId] = e.ExecutionTime;
     105          //don't include jobs in hb's which are currently serializing
     106          if (e.SendHeartbeatForExecutor) {
     107            prog[e.JobId] = e.ExecutionTime;
     108          }
    106109        }
    107110      }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Executor.cs

    r5826 r6004  
    3838    private Semaphore pauseStopSem = new Semaphore(0, 1);
    3939
     40    public bool SendHeartbeatForExecutor { get; set; }
     41
    4042    public bool Aborted { get; set; }
     43
     44    public DateTime CreationTime { get; set; }
    4145
    4246    private Exception currentException;
     
    6367    }
    6468
    65     public DateTime CreationTime { get; set; }
     69    public Executor() {
     70      SendHeartbeatForExecutor = true;
     71    }
    6672
    6773    /// <param name="serializedJob"></param>
     
    9096
    9197    public void Pause() {
     98      SendHeartbeatForExecutor = false;
    9299      if (Job == null) {
    93100        SlaveClientCom.Instance.ClientCom.LogMessage("Pausing job: Job is null");
     
    108115
    109116    public void Stop() {
     117      SendHeartbeatForExecutor = false;
    110118      if (Job == null) {
    111119        SlaveClientCom.Instance.ClientCom.LogMessage("Stopping job: Job is null");
     
    181189
    182190    private void Job_JobFailed(object sender, EventArgs e) {
    183       //TODO: get exception to client
    184191      HeuristicLab.Common.EventArgs<Exception> ex = (HeuristicLab.Common.EventArgs<Exception>)e;
    185192      currentException = ex.Value;
     
    241248    }
    242249
    243     public Executor() {
    244     }
    245 
    246250    public void Dispose() {
    247251      if (Job != null)
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/PluginCache.cs

    r5787 r6004  
    142142        SlaveClientCom.Instance.ClientCom.LogMessage("Fetching plugins for job");
    143143
    144         IEnumerable<Plugin> pluginDescriptions = WcfService.Instance.GetPlugins();
    145144        List<Plugin> requiredPlugins = new List<Plugin>();
    146145        foreach (Guid pluginId in myJob.PluginsNeededIds) {
    147           Plugin pl = pluginDescriptions.FirstOrDefault(p => p.Id == pluginId);
    148           if (pl != null)
    149             requiredPlugins.Add(pl);
     146          //TODO: rewrite, GetPlugin(..) should be the last thing to do after checking the local plugins
     147          Plugin plugin = WcfService.Instance.GetPlugin(pluginId);
     148          if (plugin != null)
     149            requiredPlugins.Add(plugin);
    150150        }
    151151
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/WcfService.cs

    r5790 r6004  
    112112
    113113    #region Plugin Methods
     114
     115    public Plugin GetPlugin(Guid id) {
     116      return CallHiveService(s => s.GetPlugin(id));
     117    }
     118
    114119    public IEnumerable<Plugin> GetPlugins() {
    115120      return CallHiveService(s => s.GetPlugins());
Note: See TracChangeset for help on using the changeset viewer.