- Timestamp:
- 10/09/11 01:47:51 (13 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.3/Core.cs
r6863 r6893 189 189 wcfService.Connect(configManager.GetClientInfo()); 190 190 break; 191 case MessageContainer.MessageType.NewHBInterval: 192 int interval = wcfService.GetNewHeartbeatInterval(ConfigManager.Instance.GetClientInfo().Id); 193 if (interval != -1) { 194 HeartbeatManager.Interval = TimeSpan.FromSeconds(interval); 195 } 196 break; 191 197 } 192 198 } else { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.3/Manager/HeartbeatManager.cs
r6464 r6893 33 33 public class HeartbeatManager { 34 34 private static object locker = new object(); 35 public TimeSpan Interval { get; set; } 35 private TimeSpan interval; 36 37 public TimeSpan Interval { 38 get { return interval; } 39 set { 40 interval = value; 41 Settings.Default.HeartbeatInterval = interval; 42 Settings.Default.Save(); 43 } 44 } 36 45 private Thread heartBeatThread; 37 46 private AutoResetEvent waitHandle; … … 40 49 41 50 public HeartbeatManager() { 42 Interval = Settings.Default.HeartbeatInterval;51 interval = Settings.Default.HeartbeatInterval; 43 52 } 44 53 … … 91 100 CpuUtilization = ConfigManager.Instance.GetCpuUtilization(), 92 101 JobProgress = ConfigManager.Instance.GetExecutionTimeOfAllJobs(), 93 AssignJob = !ConfigManager.Instance.Asleep 102 AssignJob = !ConfigManager.Instance.Asleep, 103 HbInterval = (int)interval.TotalSeconds 94 104 }; 95 105 … … 112 122 OnExceptionOccured(e); 113 123 } 114 waitHandle.WaitOne(this. Interval);124 waitHandle.WaitOne(this.interval); 115 125 } 116 126 waitHandle.Close(); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.3/WcfService.cs
r6744 r6893 144 144 } 145 145 146 public int GetNewHeartbeatInterval(Guid id) { 147 int ret = -1; 148 CallHiveService(s => ret = s.GetNewHeartbeatInterval(id)); 149 return ret; 150 } 151 146 152 /// <summary> 147 153 /// Network communication error handler.
Note: See TracChangeset
for help on using the changeset viewer.