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
168168 progressTask . StartTask ( ) ;
169169 var estimatedDuration = moduleToProcess . EstimatedDuration * 1.1 ; // Give 10% headroom
170170
171- var totalEstimatedSeconds = estimatedDuration . TotalSeconds >= 1 ? estimatedDuration . TotalSeconds : 1 ;
171+ var totalEstimatedSeconds = estimatedDuration . TotalSeconds >= 1.0 ? estimatedDuration . TotalSeconds : 1.0 ;
172172
173- var ticksPerSecond = 100 / totalEstimatedSeconds ;
173+ var ticksPerSecond = 100.0 / totalEstimatedSeconds ;
174174
175175 progressTask . Description = moduleName ;
176- while ( progressTask is { IsFinished : false , Value : < 95 } )
176+ while ( progressTask is { IsFinished : false , Value : < 95 } && ticksPerSecond + progressTask . Value < 95 )
177177 {
178178 await Task . Delay ( TimeSpan . FromSeconds ( 1 ) , CancellationToken . None ) ;
179179 progressTask . Increment ( ticksPerSecond ) ;
You canβt perform that action at this time.
0 commit comments