Add Session:DelayCleaningFailedDeployments config

Closes #1768
This commit is contained in:
Jordan Dominion
2024-01-14 15:04:10 -05:00
parent d1249121b0
commit 4fff0490b7
4 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
<Import Project="WebpanelVersion.props" />
<PropertyGroup>
<TgsCoreVersion>6.1.2</TgsCoreVersion>
<TgsConfigVersion>5.0.0</TgsConfigVersion>
<TgsConfigVersion>5.1.0</TgsConfigVersion>
<TgsApiVersion>10.0.0</TgsApiVersion>
<TgsCommonLibraryVersion>7.0.0</TgsCommonLibraryVersion>
<TgsApiLibraryVersion>13.0.1</TgsApiLibraryVersion>
@@ -953,6 +953,12 @@ namespace Tgstation.Server.Host.Components.Deployment
{
async ValueTask CleanDir()
{
if (sessionConfiguration.DelayCleaningFailedDeployments)
{
logger.LogDebug("Not cleaning up errored deployment directory {guid} due to config.", job.DirectoryName);
return;
}
logger.LogTrace("Cleaning compile directory...");
var jobPath = job.DirectoryName!.Value.ToString();
try
@@ -24,5 +24,10 @@
/// If the deployment DreamMaker and DreamDaemon instances are set to be below normal priority processes.
/// </summary>
public bool LowPriorityDeploymentProcesses { get; set; }
/// <summary>
/// If <see langword="true"/>, deployments that fail will not be immediately cleaned up. They will be cleaned up the next time the instance is onlined.
/// </summary>
public bool DelayCleaningFailedDeployments { get; set; }
}
}
@@ -22,6 +22,7 @@ General:
Session:
HighPriorityLiveDreamDaemon: false # If DreamDaemon instances should run as higher priority processes
LowPriorityDeploymentProcesses: true # If TGS Deployments should run as lower priority processes
DelayCleaningFailedDeployments: false # If true, deployments that fail will not be immediately cleaned up. They will be cleaned up the next time the instance is onlined
FileLogging:
Directory: # Directory in which log files are stored. Windows default: %PROGRAMDATA%/tgstation-server. Linux default: /var/log/tgstation-server
Disable: true # Disable file logging entirely