Merge pull request #542 from tgstation/Cyberboss-patch-1

Adds more watchdog logs
This commit is contained in:
Jordan Brown
2018-07-15 17:57:09 -04:00
committed by GitHub
2 changed files with 14 additions and 2 deletions
+8
View File
@@ -331,5 +331,13 @@ namespace TGS.Server
/// Warning: When a testmerge commit failed to be published
/// </summary>
ReferencePush = 7700,
/// <summary>
/// Warning: When the server exits unexpectedly
/// </summary>
DDServerCrash = 7800,
/// <summary>
/// Info: When the DreamDaemon process is about to be launched
/// </summary>
DDServerStart = 7800,
}
}
+6 -2
View File
@@ -374,7 +374,10 @@ namespace TGS.Server
}
}
WriteCurrentDDLog("Crash detected!");
WriteCurrentDDLog("Crash detected! Exit code: " + Proc.ExitCode);
var runtimeS = (DateTime.Now - starttime).TotalSeconds;
WriteWarning("DD crashed: Exit Code: " + Proc.ExitCode + " Seconds running: " + runtimeS, EventID.DDServerCrash);
lock (watchdogLock)
{
@@ -384,7 +387,7 @@ namespace TGS.Server
if (AwaitingShutdown == ShutdownRequestPhase.Pinged)
return;
var BadStart = (DateTime.Now - starttime).TotalSeconds < DDBadStartTime;
var BadStart = runtimeS < DDBadStartTime;
if (BadStart)
{
++retries;
@@ -619,6 +622,7 @@ namespace TGS.Server
{
GameAPIVersion = null; //needs updating
}
WriteInfo("Starting DD: " + Proc.StartInfo.FileName + " " + Proc.StartInfo.Arguments, EventID.DDServerStart);
Proc.Start();
Proc.PriorityClass = ProcessPriorityClass.AboveNormal;