Skip to content

Commit 82f4125

Browse files
committed
Now restarts work as intended; finding latest status from logfile
1 parent 624534c commit 82f4125

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core/study.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,13 +283,13 @@ function update_sim_success_from_log!(study::Study)
283283
for (i, path) in enumerate(study.jobpaths)
284284
# Search for the Simulation line for this job path
285285
sim_line_pattern = "Simulation `$(path)`:"
286-
sim_line_idx = findfirst(line -> occursin(sim_line_pattern, line), lines)
287-
288-
if sim_line_idx === nothing
286+
sim_line_idxs = findall(line -> occursin(sim_line_pattern, line), lines)
287+
if isempty(sim_line_idxs)
289288
# No record for this job in logfile
290289
study.sim_success[i] = false
291290
continue
292291
end
292+
sim_line_idx = sim_line_idxs[end] # Take the last occurrence (restarts also logged)
293293

294294
# Look for status line in the next few lines after the simulation line
295295
found_status = false

0 commit comments

Comments
 (0)