- Timestamp:
- 08/13/15 15:22:51 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/HiveJanitor.cs
r12789 r12858 55 55 56 56 public void RunCleanup() { 57 var pm = PersistenceManager; 57 58 while (!stop) { 58 59 try { 59 60 LogFactory.GetLogger(typeof(HiveJanitor).Namespace).Log("HiveJanitor: starting cleanup."); 60 61 bool cleanup = false; 61 using (var pm = PersistenceManager) { 62 63 64 65 66 67 68 69 70 71 72 } 62 63 var lifecycleDao = pm.LifecycleDao; 64 pm.UseTransaction(() => { 65 var lifecycle = lifecycleDao.GetLastLifecycle(); 66 if (lifecycle == null 67 || DateTime.Now - lifecycle.LastCleanup > HeuristicLab.Services.Hive.Properties.Settings.Default.CleanupInterval) { 68 lifecycleDao.UpdateLifecycle(); 69 cleanup = true; 70 } 71 pm.SubmitChanges(); 72 }, true); 73 73 74 if (cleanup) { 74 75 EventManager.Cleanup();
Note: See TracChangeset
for help on using the changeset viewer.