Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 6c2d8b1b authored by Harald Martini's avatar Harald Martini
Browse files

don't resolve modfile name when no filewriter is found

parent 26f459c8
No related branches found
No related tags found
No related merge requests found
...@@ -1109,24 +1109,23 @@ lbFound: ...@@ -1109,24 +1109,23 @@ lbFound:
Dim sumProgress As Double = progress.Sum(Function(pair) pair.Value.Progress) Dim sumProgress As Double = progress.Sum(Function(pair) pair.Value.Progress)
Dim duration As Double = (DateTime.Now() - start).TotalSeconds Dim duration As Double = (DateTime.Now() - start).TotalSeconds
sender.ReportProgress(Convert.ToInt32((sumProgress*100.0)/progress.Count),
sender.ReportProgress(Convert.ToInt32((sumProgress*100.0)/progress.Count),
New VectoProgress With {.Target = "Status", New VectoProgress With {.Target = "Status",
.Message = $"Duration: {duration:0}s, Current Progress: {(sumProgress/progress.Count):P} ({ _ .Message = $"Duration: {duration:0}s, Current Progress: {(sumProgress/progress.Count):P} ({ _
String.Join(", ", progress.Select(Function(pair) $"{pair.Value.Progress,4:P}"))})"}) String.Join(", ", progress.Select(Function(pair) $"{pair.Value.Progress,4:P}"))})"})
Dim justFinished As Dictionary(Of Integer, JobContainer.ProgressEntry) = Dim justFinished As Dictionary(Of Integer, JobContainer.ProgressEntry) = New Dictionary(Of Integer,JobContainer.ProgressEntry)(
progress.Where(Function(proc) proc.Value.Done AndAlso Not finishedRuns.Contains(proc.Key)). progress.Where(Function(proc) proc.Value.Done AndAlso Not finishedRuns.Contains(proc.Key)).ToDictionary(Function(pair) pair.Key, Function(pair) pair.Value))
ToDictionary(
Function(pair) pair.Key, Function(pair) pair.Value)
PrintRuns(justFinished, fileWriters) PrintRuns(justFinished, fileWriters)
finishedRuns.AddRange(justFinished.Select(Function(pair) pair.Key)) finishedRuns.AddRange(justFinished.Select(Function(pair) pair.Key))
Thread.Sleep(100) Thread.Sleep(100)
End While End While
Dim remainingRuns As Dictionary(Of Integer, JobContainer.ProgressEntry) = Dim remainingRuns As Dictionary(Of Integer, JobContainer.ProgressEntry) = New Dictionary(Of Integer,JobContainer.ProgressEntry)(jobContainer.GetProgress().Where(
jobContainer.GetProgress().Where( Function(proc) proc.Value.Done AndAlso Not finishedRuns.Contains(proc.Key)).ToDictionary(Function(pair) pair.Key, Function(pair) pair.Value))
Function(proc) proc.Value.Done AndAlso Not finishedRuns.Contains(proc.Key)).
ToDictionary(Function(pair) pair.Key, Function(pair) pair.Value)
PrintRuns(remainingRuns, fileWriters) PrintRuns(remainingRuns, fileWriters)
finishedRuns.Clear() finishedRuns.Clear()
...@@ -1206,9 +1205,10 @@ lbFound: ...@@ -1206,9 +1205,10 @@ lbFound:
Private Shared Sub PrintRuns(progress As Dictionary(Of Integer, JobContainer.ProgressEntry), Private Shared Sub PrintRuns(progress As Dictionary(Of Integer, JobContainer.ProgressEntry),
fileWriters As Dictionary(Of Integer, FileOutputWriter)) fileWriters As Dictionary(Of Integer, FileOutputWriter))
For Each p As KeyValuePair(Of Integer, JobContainer.ProgressEntry) In progress For Each p As KeyValuePair(Of Integer, JobContainer.ProgressEntry) In progress
Dim modFilename As String = fileWriters(p.Key).GetModDataFileName(p.Value.RunName, p.Value.CycleName, Dim modFilename As String = if(fileWriters.ContainsKey(p.Key) , fileWriters(p.Key).GetModDataFileName(p.Value.RunName, p.Value.CycleName,
p.Value.RunSuffix + p.Value.RunSuffix +
If(Cfg.Mod1Hz, "_1Hz", "")) If(Cfg.Mod1Hz, "_1Hz", "")) , "");
Dim runName As String = $"{p.Value.RunName} {p.Value.CycleName} {p.Value.RunSuffix}" Dim runName As String = $"{p.Value.RunName} {p.Value.CycleName} {p.Value.RunSuffix}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment