Changeset 12172 for trunk/sources/HeuristicLab.Services.Hive/3.3/Manager
- Timestamp:
- 03/10/15 10:25:54 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Services.Hive/3.3/Manager/EventManager.cs
r12012 r12172 122 122 /// </summary> 123 123 private void DeleteObsoleteSlaves() { 124 var slaves = dao.GetSlaves(x => x.IsDisposable.GetValueOrDefault() && x.SlaveState == SlaveState.Offline && (DateTime.Now - x.LastHeartbeat) > HeuristicLab.Services.Hive.Properties.Settings.Default.SweepInterval); 125 foreach (DT.Slave slave in slaves) dao.DeleteSlave(slave.Id); 124 var slaves = dao.GetSlaves(x => x.IsDisposable.GetValueOrDefault() && 125 x.SlaveState == SlaveState.Offline && 126 (DateTime.Now - x.LastHeartbeat) > Hive.Properties.Settings.Default.SweepInterval) 127 .Select(x => x.Id) 128 .ToArray(); 129 130 foreach (Guid slaveId in slaves) { 131 var downtimesAvailable = dao.GetDowntimes(x => x.ResourceId == slaveId).Any(); 132 if (!downtimesAvailable) { 133 dao.DeleteSlave(slaveId); 134 } 135 } 126 136 } 127 137 }
Note: See TracChangeset
for help on using the changeset viewer.