diff --git a/build/Version.props b/build/Version.props
index da62ceb40a..bbe357f32c 100644
--- a/build/Version.props
+++ b/build/Version.props
@@ -4,7 +4,7 @@
6.1.2
- 5.0.0
+ 5.1.0
10.0.0
7.0.0
13.0.1
diff --git a/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs b/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs
index adfc780bfa..ac5c4576e3 100644
--- a/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs
+++ b/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs
@@ -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
diff --git a/src/Tgstation.Server.Host/Configuration/SessionConfiguration.cs b/src/Tgstation.Server.Host/Configuration/SessionConfiguration.cs
index 9d0a18f656..c543698b90 100644
--- a/src/Tgstation.Server.Host/Configuration/SessionConfiguration.cs
+++ b/src/Tgstation.Server.Host/Configuration/SessionConfiguration.cs
@@ -24,5 +24,10 @@
/// If the deployment DreamMaker and DreamDaemon instances are set to be below normal priority processes.
///
public bool LowPriorityDeploymentProcesses { get; set; }
+
+ ///
+ /// If , deployments that fail will not be immediately cleaned up. They will be cleaned up the next time the instance is onlined.
+ ///
+ public bool DelayCleaningFailedDeployments { get; set; }
}
}
diff --git a/src/Tgstation.Server.Host/appsettings.yml b/src/Tgstation.Server.Host/appsettings.yml
index 56f87f2169..4868f519fd 100644
--- a/src/Tgstation.Server.Host/appsettings.yml
+++ b/src/Tgstation.Server.Host/appsettings.yml
@@ -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