Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6897


Ignore:
Timestamp:
10/10/11 15:20:01 (13 years ago)
Author:
ascheibe
Message:

#1233

  • fixed bug that occurred when setting the Heartbeat Interval for a group of slaves
  • slave reports HbInterval now correct on first start
Location:
branches/HeuristicLab.Hive-3.4/sources
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs

    r6893 r6897  
    196196    void SlaveViewContent_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) {
    197197      OnContentChanged();
     198      if (e.PropertyName == "HbInterval") {
     199        UpdateChildHbIntervall(slaveView.Content);
     200      }
     201    }
     202
     203    private void UpdateChildHbIntervall(Resource resource) {
     204      foreach (Resource r in Content.Where(x => x.ParentResourceId == resource.Id)) {
     205        r.HbInterval = resource.HbInterval;
     206        if (r is SlaveGroup) {
     207          UpdateChildHbIntervall(r);
     208        }
     209      }
    198210    }
    199211
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/SlaveView.cs

    r6893 r6897  
    124124            Content.HbInterval = interval;
    125125          }
    126           catch (Exception ex) {
     126          catch (Exception) {
    127127            MessageBox.Show("Please enter a numeric value for the Heartbeat Interval.", "HeuristicLab Hive Administrator", MessageBoxButtons.OK, MessageBoxIcon.Error);
    128             txtHbIntervall.Text = "0";
     128            txtHbIntervall.Text = "10";
    129129          }
    130130        }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.WindowsService/3.3/SlaveWindowsService.cs

    r6744 r6897  
    3333      try {
    3434        if (!System.Diagnostics.EventLog.SourceExists("HLHive")) {
    35           System.Diagnostics.EventLog.CreateEventSource("HLHive", "Slave");
     35          System.Diagnostics.EventLog.CreateEventSource("HLHive", "HiveSlave");
    3636        }
    3737        eventLog.Source = "HLHive";
    38         eventLog.Log = "Slave";
     38        eventLog.Log = "HiveSlave";
    3939      }
    4040      catch (Exception) { }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.3/Manager/ConfigManager.cs

    r6725 r6897  
    2525using System.Linq;
    2626using System.Management;
     27using HeuristicLab.Clients.Hive.SlaveCore.Properties;
    2728
    2829
     
    5152    public ConfigManager(TaskManager jobManager) {
    5253      this.jobManager = jobManager;
     54      UpdateSlaveInfo();
     55    }
     56
     57    private void UpdateSlaveInfo() {
    5358      cpuCounter = new PerformanceCounter();
    5459      cpuCounter.CategoryName = "Processor";
     
    6671      slave.CpuSpeed = GetCpuSpeed();
    6772      slave.FreeMemory = GetFreeMemory();
     73      slave.HbInterval = (int)Settings.Default.HeartbeatInterval.TotalSeconds;
    6874    }
    6975
     
    7379    /// <returns>the ClientInfo object</returns>
    7480    public Slave GetClientInfo() {
     81      UpdateSlaveInfo();
    7582      return slave;
    7683    }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/HiveService.cs

    r6893 r6897  
    496496      authen.AuthenticateForAnyRole(HiveRoles.Administrator);
    497497      trans.UseTransaction(() => {
    498         UpdateSlaveHBs(slaveGroup);
    499       });
    500     }
    501 
    502     private void UpdateSlaveHBs(Resource r) {
    503       foreach (Resource resource in dao.GetChildResources(r.Id)) {
    504         if (resource is SlaveGroup) {
    505           resource.HbInterval = r.HbInterval;
    506           dao.UpdateSlaveGroup(resource as SlaveGroup);
    507           UpdateSlaveHBs(resource);
    508         } else if (resource is Slave) {
    509           resource.HbInterval = r.HbInterval;
    510           dao.UpdateSlave(resource as Slave);
    511         }
    512       }
     498        dao.UpdateSlaveGroup(slaveGroup);
     499      });
    513500    }
    514501
Note: See TracChangeset for help on using the changeset viewer.