File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change
1
+ Fix modules appearing as completed (100%) before they had actually completed
Original file line number Diff line number Diff line change @@ -168,12 +168,12 @@ private static void RegisterModules(IReadOnlyList<RunnableModule> modulesToProce
168
168
progressTask . StartTask ( ) ;
169
169
var estimatedDuration = moduleToProcess . EstimatedDuration * 1.1 ; // Give 10% headroom
170
170
171
- var totalEstimatedSeconds = estimatedDuration . TotalSeconds >= 1 ? estimatedDuration . TotalSeconds : 1 ;
171
+ var totalEstimatedSeconds = estimatedDuration . TotalSeconds >= 1.0 ? estimatedDuration . TotalSeconds : 1.0 ;
172
172
173
- var ticksPerSecond = 100 / totalEstimatedSeconds ;
173
+ var ticksPerSecond = 100.0 / totalEstimatedSeconds ;
174
174
175
175
progressTask . Description = moduleName ;
176
- while ( progressTask is { IsFinished : false , Value : < 95 } )
176
+ while ( progressTask is { IsFinished : false , Value : < 95 } && ticksPerSecond + progressTask . Value < 95 )
177
177
{
178
178
await Task . Delay ( TimeSpan . FromSeconds ( 1 ) , CancellationToken . None ) ;
179
179
progressTask . Increment ( ticksPerSecond ) ;
You can’t perform that action at this time.
0 commit comments