Skip to content
Snippets Groups Projects
Commit fbc3068a authored by Florian Atteneder's avatar Florian Atteneder
Browse files

fix wrong callback invokation when finishing

parent 398dfb8d
No related branches found
No related tags found
No related merge requests found
......@@ -56,18 +56,19 @@ function main(parfile)
finally
# finish timer and progress bar
idx = findfirst(cb -> cb isa TimerOutputCallback, reverse(env.callbacks.callbacks))
idx = findlast(cb -> cb isa TimerOutputCallback, env.callbacks.callbacks)
if !isnothing(idx)
timercb = env.callbacks.callbacks[idx]
timercb([], 0.0, 0, force=true)
end
idx = findfirst(cb -> cb isa ProgressCallback, reverse(env.callbacks.callbacks))
if !isnothing(idx)
progresscb = env.callbacks.callbacks[idx]
progresscb([], 0.0, 0, force=true)
else
display(dg1d.TO)
end
# Can't force atm, because ProgressCallback uses an internal CallbackTiming...
# forwarded through the callback, henc
# idx = findlast(cb -> cb isa ProgressCallback, env.callbacks.callbacks)
# if !isnothing(idx)
# progresscb = env.callbacks.callbacks[idx]
# progresscb([], 0.0, 0, force=true)
# end
display(dg1d.TO)
end
......
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