Changeset 12777


Ignore:
Timestamp:
07/20/15 13:47:59 (4 years ago)
Author:
dglaser
Message:

#2429: Start and end dates are now considered when aggregating FactClientInfo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Maintenance/3.3/WebApi/FactClientInfoController.cs

    r12769 r12777  
    5656        );
    5757        foreach (var id in clientIds) {
    58           AggregateClient(pm, id, entries);
     58          AggregateClient(pm, id, start, end, entries);
    5959        }
    6060        dimTimeDao.DeleteUnusedTimes();
     
    6262    }
    6363
    64     private void AggregateClient(IPersistenceManager pm, Guid clientId, int entries) {
     64    private void AggregateClient(IPersistenceManager pm, Guid clientId, DateTime start, DateTime end, int entries) {
    6565      var factClientInfoDao = pm.FactClientInfoDao;
    66       var clientInfos = pm.UseTransaction(() => factClientInfoDao.GetByClientId(clientId).OrderBy(x => x.Time).ToList());
     66      var clientInfos = pm.UseTransaction(() => factClientInfoDao.GetByClientId(clientId)
     67        .Where(x => x.Time >= start && x.Time <= end)
     68        .OrderBy(x => x.Time)
     69        .ToList()
     70      );
    6771      var e = clientInfos.GetEnumerator();
    6872      if (!e.MoveNext()) return;
Note: See TracChangeset for help on using the changeset viewer.