mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 00:22:40 +01:00
Various things:
Remove leading whitespace in Process output IDreamMaker.Compile now only returns successful CompileJobs Added a todo about JobExceptions
This commit is contained in:
@@ -176,7 +176,7 @@ namespace Tgstation.Server.Host.Components.Compiler
|
||||
|
||||
logger.LogDebug("DreamMaker exit code: {0}", exitCode);
|
||||
job.Output = dm.GetCombinedOutput();
|
||||
logger.LogTrace("DreamMaker output: {0}", job.Output);
|
||||
logger.LogTrace("DreamMaker output: {0}{1}", Environment.NewLine, job.Output);
|
||||
return exitCode;
|
||||
}
|
||||
}
|
||||
@@ -263,11 +263,7 @@ namespace Tgstation.Server.Host.Components.Compiler
|
||||
lock (this)
|
||||
{
|
||||
if (Status != CompilerStatus.Idle)
|
||||
{
|
||||
job.Output = "There is already a compile in progress!";
|
||||
logger.LogInformation(job.Output);
|
||||
return job;
|
||||
}
|
||||
throw new Exception("There is already a compile in progress!");
|
||||
|
||||
Status = CompilerStatus.Copying;
|
||||
}
|
||||
@@ -340,11 +336,7 @@ namespace Tgstation.Server.Host.Components.Compiler
|
||||
logger.LogTrace("Searching for available .dmes...");
|
||||
var path = (await ioManager.GetFilesWithExtension(dirA, DmeExtension, cancellationToken).ConfigureAwait(false)).FirstOrDefault();
|
||||
if (path == default)
|
||||
{
|
||||
job.Output = "Unable to find any .dme!";
|
||||
logger.LogWarning(job.Output);
|
||||
return job;
|
||||
}
|
||||
throw new Exception("Unable to find any .dme!");
|
||||
var dmeWithExtension = ioManager.GetFileName(path);
|
||||
job.DmeName = dmeWithExtension.Substring(0, dmeWithExtension.Length - DmeExtension.Length - 1);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace Tgstation.Server.Host.Core
|
||||
{
|
||||
if (combinedStringBuilder == null)
|
||||
throw new InvalidOperationException("Output/Error reading was not enabled!");
|
||||
return combinedStringBuilder.ToString();
|
||||
return combinedStringBuilder.ToString().TrimStart(Environment.NewLine.ToCharArray());
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -58,7 +58,7 @@ namespace Tgstation.Server.Host.Core
|
||||
{
|
||||
if (errorStringBuilder == null)
|
||||
throw new InvalidOperationException("Error reading was not enabled!");
|
||||
return errorStringBuilder.ToString();
|
||||
return errorStringBuilder.ToString().TrimStart(Environment.NewLine.ToCharArray());
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -66,7 +66,7 @@ namespace Tgstation.Server.Host.Core
|
||||
{
|
||||
if (outputStringBuilder == null)
|
||||
throw new InvalidOperationException("Output reading was not enabled!");
|
||||
return errorStringBuilder.ToString();
|
||||
return errorStringBuilder.ToString().TrimStart(Environment.NewLine.ToCharArray());
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
Verify the byond cache folder location on linux
|
||||
|
||||
Test watchdog
|
||||
|
||||
Add a JobException type that the job manager will just print the message of. Replace throw new Exception()s with it
|
||||
|
||||
Reference in New Issue
Block a user