mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-29 16:11:05 +01:00
Fix rogue exceptions flying in CompileJob cleanup
This commit is contained in:
@@ -412,7 +412,20 @@ namespace Tgstation.Server.Host.Components.Deployment
|
||||
|
||||
var deleteTask = DeleteCompileJobContent(job.DirectoryName.ToString(), cleanupCts.Token);
|
||||
var otherTask = cleanupTask;
|
||||
await Task.WhenAll(otherTask, deleteTask, deploymentJob);
|
||||
|
||||
async Task WrapThrowableTasks()
|
||||
{
|
||||
try
|
||||
{
|
||||
await Task.WhenAll(deleteTask, deploymentJob);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.LogWarning(ex, "Error cleaning up compile job {jobGuid}!", job.DirectoryName);
|
||||
}
|
||||
}
|
||||
|
||||
await Task.WhenAll(otherTask, WrapThrowableTasks());
|
||||
}
|
||||
|
||||
lock (jobLockCounts)
|
||||
|
||||
Reference in New Issue
Block a user