Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/21/12 15:12:15 (13 years ago)
Author:
jkarder
Message:

#1854:

  • integrated marker attribute (IsDisposable) into the Hive components
  • adjusted database scheme
  • extended administration user interface
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Services.Hive/3.3/Manager/EventManager.cs

    r7434 r7857  
    4949        SetTimeoutSlavesOffline();
    5050        SetTimeoutTasksWaiting();
     51        DeleteObsoleteSlaves();
    5152      }, true);
    5253
     
    116117      }
    117118    }
     119
     120    /// <summary>
     121    /// Searches for slaves that are disposable and deletes them if they were offline for too long
     122    /// </summary>
     123    private void DeleteObsoleteSlaves() {
     124      var slaves = dao.GetSlaves(x => x.IsDisposable && 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);
     126    }
    118127  }
    119128}
Note: See TracChangeset for help on using the changeset viewer.