1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 23:31:13 -05:00

fix aggregate issue with KDR on global top stats

refactor some of the main application code to have a cleaner code flow
add enviroment flag to opt out of .net core telemetry in start script
fixed "a moment" missing the "ago"
fixed case sensitive client searches on postgresql
clean up command code flow
Add missing map "mp_cairo" to default settings
This commit is contained in:
RaidMax
2019-05-08 20:34:17 -05:00
parent 145a444896
commit b14a5ced52
22 changed files with 492 additions and 409 deletions

View File

@ -53,7 +53,7 @@ namespace WebfrontCore.Controllers
Manager.GetEventHandler().AddEvent(remoteEvent);
List<CommandResponseInfo> response;
// wait for the event to process
if (!(await remoteEvent.WaitAsync(60 * 1000)).Failed)
if (!(await remoteEvent.WaitAsync(Utilities.DefaultCommandTimeout, server.Manager.CancellationToken)).Failed)
{
response = server.CommandResult.Where(c => c.ClientId == client.ClientId).ToList();

View File

@ -1,4 +1,6 @@
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using SharedLibraryCore.Interfaces;
@ -9,18 +11,18 @@ namespace WebfrontCore
{
public static IManager Manager;
static void Main(string[] args)
static void Main()
{
throw new System.Exception("Webfront core cannot be run as a standalone application");
}
public static void Init(IManager mgr)
public static Task Init(IManager mgr, CancellationToken cancellationToken)
{
Manager = mgr;
BuildWebHost().Run();
return BuildWebHost().RunAsync(cancellationToken);
}
public static IWebHost BuildWebHost()
private static IWebHost BuildWebHost()
{
var config = new ConfigurationBuilder()
.AddEnvironmentVariables()