increase master history to 7 day, up from 1 day
This commit is contained in:
parent
50ba71c6fb
commit
d73d68d9f4
@ -8,7 +8,7 @@ class History():
|
||||
self.server_history = list()
|
||||
|
||||
def add_client_history(self, client_num):
|
||||
if len(self.client_history) > 2880:
|
||||
if len(self.client_history) > 20160:
|
||||
self.client_history = self.client_history[1:]
|
||||
self.client_history.append({
|
||||
'count' : client_num,
|
||||
@ -16,7 +16,7 @@ class History():
|
||||
})
|
||||
|
||||
def add_server_history(self, server_num):
|
||||
if len(self.server_history) > 2880:
|
||||
if len(self.server_history) > 20160:
|
||||
self.server_history = self.server_history[1:]
|
||||
self.server_history.append({
|
||||
'count' : server_num,
|
||||
@ -24,7 +24,7 @@ class History():
|
||||
})
|
||||
|
||||
def add_instance_history(self, instance_num):
|
||||
if len(self.instance_history) > 2880:
|
||||
if len(self.instance_history) > 20160:
|
||||
self.instance_history = self.instance_history[1:]
|
||||
self.instance_history.append({
|
||||
'count' : instance_num,
|
||||
|
@ -1,8 +1,5 @@
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace LiveRadar.Configuration
|
||||
{
|
||||
@ -36,8 +33,7 @@ namespace LiveRadar.Configuration
|
||||
MaxRight = -225,
|
||||
MaxLeft = 1809,
|
||||
MaxTop = 1773,
|
||||
MaxBottom = -469,
|
||||
ViewPositionRotation = 180
|
||||
MaxBottom = -469
|
||||
},
|
||||
|
||||
new MapInfo()
|
||||
@ -61,10 +57,10 @@ namespace LiveRadar.Configuration
|
||||
Bottom = 999,
|
||||
Left = 173,
|
||||
Right = 942,
|
||||
MaxTop = 2103, // x max
|
||||
MaxBottom = -5077, //x min
|
||||
MaxLeft = 4437, // ymax
|
||||
MaxRight = -1240, // y min
|
||||
MaxTop = 2103,
|
||||
MaxBottom = -5077,
|
||||
MaxLeft = 4437,
|
||||
MaxRight = -1240,
|
||||
Rotation = 143,
|
||||
CenterX = -1440,
|
||||
CenterY = 1920,
|
||||
|
@ -30,7 +30,11 @@ namespace SharedLibraryCore
|
||||
/// <summary>
|
||||
/// client is doing too much of something
|
||||
/// </summary>
|
||||
Throttle
|
||||
Throttle,
|
||||
/// <summary>
|
||||
/// the event timed out before completion
|
||||
/// </summary>
|
||||
Timeout
|
||||
}
|
||||
|
||||
public enum EventType
|
||||
@ -225,7 +229,9 @@ namespace SharedLibraryCore
|
||||
{
|
||||
return Task.Run(() =>
|
||||
{
|
||||
OnProcessed.Wait(timeSpan, token);
|
||||
bool processed = OnProcessed.Wait(timeSpan, token);
|
||||
// this let's us know if the the action timed out
|
||||
FailReason = FailReason == EventFailReason.None & !processed ? EventFailReason.Timeout : FailReason;
|
||||
return this;
|
||||
});
|
||||
}
|
||||
|
@ -51,12 +51,13 @@ namespace WebfrontCore.Controllers
|
||||
};
|
||||
|
||||
Manager.GetEventHandler().AddEvent(remoteEvent);
|
||||
List<CommandResponseInfo> response;
|
||||
List<CommandResponseInfo> response = null;
|
||||
|
||||
try
|
||||
{
|
||||
var completedEvent = await remoteEvent.WaitAsync(Utilities.DefaultCommandTimeout, server.Manager.CancellationToken);
|
||||
// wait for the event to process
|
||||
if (!(await remoteEvent.WaitAsync(Utilities.DefaultCommandTimeout, server.Manager.CancellationToken)).Failed)
|
||||
if (!completedEvent.Failed)
|
||||
{
|
||||
response = server.CommandResult.Where(c => c.ClientId == client.ClientId).ToList();
|
||||
|
||||
@ -67,16 +68,16 @@ namespace WebfrontCore.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
else if (completedEvent.FailReason == GameEvent.EventFailReason.Timeout)
|
||||
{
|
||||
response = new List<CommandResponseInfo>()
|
||||
{
|
||||
new CommandResponseInfo()
|
||||
{
|
||||
ClientId = client.ClientId,
|
||||
Response = Utilities.CurrentLocalization.LocalizationIndex["SERVER_ERROR_COMMAND_TIMEOUT"]
|
||||
}
|
||||
};
|
||||
new CommandResponseInfo()
|
||||
{
|
||||
ClientId = client.ClientId,
|
||||
Response = Utilities.CurrentLocalization.LocalizationIndex["SERVER_ERROR_COMMAND_TIMEOUT"]
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ $(document).ready(function () {
|
||||
});
|
||||
|
||||
$(document).keydown(function (event) {
|
||||
const keyCode = (event.keyCode ? event.keyCode : event.which);
|
||||
const keyCode = event.keyCode ? event.keyCode : event.which;
|
||||
if (keyCode === 13) {
|
||||
executeCommand();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user