fix issue with alert manager concurrency
This commit is contained in:
parent
ce054c173e
commit
1e88f5bac0
@ -55,7 +55,7 @@ public class AlertManager : IAlertManager
|
|||||||
alerts = alerts.Concat(_states[client.ClientId].AsReadOnly());
|
alerts = alerts.Concat(_states[client.ClientId].AsReadOnly());
|
||||||
}
|
}
|
||||||
|
|
||||||
return alerts.OrderByDescending(alert => alert.OccuredAt);
|
return alerts.OrderByDescending(alert => alert.OccuredAt).ToList();
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
@ -178,7 +178,7 @@ namespace SharedLibraryCore
|
|||||||
ViewBag.ReportCount = Manager.GetServers().Sum(server =>
|
ViewBag.ReportCount = Manager.GetServers().Sum(server =>
|
||||||
server.Reports.Count(report => DateTime.UtcNow - report.ReportedOn <= TimeSpan.FromHours(24)));
|
server.Reports.Count(report => DateTime.UtcNow - report.ReportedOn <= TimeSpan.FromHours(24)));
|
||||||
ViewBag.PermissionsSet = PermissionsSet;
|
ViewBag.PermissionsSet = PermissionsSet;
|
||||||
ViewBag.Alerts = AlertManager.RetrieveAlerts(Client).ToList();
|
ViewBag.Alerts = AlertManager.RetrieveAlerts(Client);
|
||||||
|
|
||||||
base.OnActionExecuting(context);
|
base.OnActionExecuting(context);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user