expired alarms aus der Liste ausfiltern, Testing steht noch aus
This commit is contained in:
parent
24f0400ab0
commit
6a11764fe2
@ -49,6 +49,7 @@ namespace bsmd.AIS2Service
|
||||
{
|
||||
_sitRepList.TryAdd(key, targets[key]);
|
||||
}
|
||||
_log.InfoFormat("preloaded {0} targets", _sitRepList.Count);
|
||||
|
||||
foreach (var task in _tasks)
|
||||
{
|
||||
|
||||
@ -15,10 +15,13 @@ namespace bsmd.AIS2Service
|
||||
if (!id.HasValue) return null;
|
||||
List<ShipLocationReport> result = AISManager.SQLiteStorage.GetShipLocationReports(id.Value);
|
||||
|
||||
// Class B targets entfernen
|
||||
int classBReportCnt = result.RemoveAll(x => AISManager.SitRep.ContainsKey(x.MMSI) && (AISManager.SitRep[x.MMSI].IsClassB ?? false));
|
||||
_log.DebugFormat("removed {0} class B SLR reports from list"); // tut des?
|
||||
_log.DebugFormat("removed {0} class B alarms from list"); // tut des?
|
||||
|
||||
// auch alles entfernen was "abgelaufen" ist und nicht im SitRep enthalten ist
|
||||
int expiredCnt = result.RemoveAll(x => AISManager.SitRep.ContainsKey(x.MMSI) && ((DateTime.Now - x.Timestamp_Last).TotalMinutes > 1440));
|
||||
_log.InfoFormat("removed {0} expired (> 1 day) alarms from list");
|
||||
|
||||
Dictionary<int, List<ShipLocationReport>> mmsiDict = new Dictionary<int, List<ShipLocationReport>>();
|
||||
foreach(ShipLocationReport report in result) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user