Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/13/15 15:22:51 (9 years ago)
Author:
ascheibe
Message:

#2388

  • prevent disposing of hive data context
  • more cleanups
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/Manager/NewEventManager.cs

    r12853 r12858  
    3131      get { return ServiceLocator.Instance.PersistenceManager; }
    3232    }
    33     private IAuthorizationManager AuthorizationManager {
    34       get { return ServiceLocator.Instance.AuthorizationManager; }
    35     }
    36     private ILogger Log {
    37       get { return LogFactory.GetLogger(this.GetType().Namespace); }
    38     }
    3933
    4034    public void Cleanup() {
    41       using (var pm = PersistenceManager) {
    42         // same transactions as the old EventManager
    43         pm.UseTransaction(() => {
    44           SetTimeoutSlavesOffline(pm);
    45           SetTimeoutTasksWaiting(pm);
    46           DeleteObsoleteSlaves(pm);
    47           pm.SubmitChanges();
    48         });
     35      var pm = PersistenceManager;
     36      // same transactions as the old EventManager
     37      pm.UseTransaction(() => {
     38        SetTimeoutSlavesOffline(pm);
     39        SetTimeoutTasksWaiting(pm);
     40        DeleteObsoleteSlaves(pm);
     41        pm.SubmitChanges();
     42      });
    4943
    50         pm.UseTransaction(() => {
    51           FinishParentTasks(pm);
    52           pm.SubmitChanges();
    53         });
    54       }
     44      pm.UseTransaction(() => {
     45        FinishParentTasks(pm);
     46        pm.SubmitChanges();
     47      });
    5548    }
    5649
Note: See TracChangeset for help on using the changeset viewer.