diff --git a/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs b/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs index 0ee97da7c8..ffb2935ac9 100644 --- a/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs +++ b/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs @@ -717,13 +717,9 @@ namespace Tgstation.Server.Host.Components.Deployment /// A representing the running operation. async Task ProgressTask(JobProgressReporter progressReporter, TimeSpan? estimatedDuration, CancellationToken cancellationToken) { - if (!estimatedDuration.HasValue) - { - progressReporter.ReportProgress(null); - return; - } - - progressReporter.ReportProgress(0); + var noEstimate = !estimatedDuration.HasValue; + progressReporter.StageName = currentStage; + progressReporter.ReportProgress(noEstimate ? null : 0); var sleepInterval = estimatedDuration.HasValue ? estimatedDuration.Value / 100 : TimeSpan.FromMilliseconds(250); @@ -733,7 +729,8 @@ namespace Tgstation.Server.Host.Components.Deployment for (var iteration = 0; iteration < (estimatedDuration.HasValue ? 99 : Int32.MaxValue); ++iteration) { await Task.Delay(sleepInterval, cancellationToken); - progressReporter.ReportProgress(sleepInterval * (iteration + 1) / estimatedDuration.Value); + progressReporter.StageName = currentStage; + progressReporter.ReportProgress(noEstimate ? null : sleepInterval * (iteration + 1) / estimatedDuration.Value); } } catch (OperationCanceledException) diff --git a/src/Tgstation.Server.Host/Jobs/JobProgressReporter.cs b/src/Tgstation.Server.Host/Jobs/JobProgressReporter.cs index bf008ead13..70ca0b2bb0 100644 --- a/src/Tgstation.Server.Host/Jobs/JobProgressReporter.cs +++ b/src/Tgstation.Server.Host/Jobs/JobProgressReporter.cs @@ -14,7 +14,7 @@ namespace Tgstation.Server.Host.Jobs /// /// The name of the current stage. /// - public string StageName { get; } + public string StageName { get; set; } /// /// The for the .