JuliaParallel / ClusterManagers.jl

Other
232 stars 74 forks source link

lsf_bpeek makes strong assumptions on iterator state of retry_delays #171

Closed DrChainsaw closed 2 years ago

DrChainsaw commented 2 years ago

This line seems to make some pretty strong assumptions on the retry_delays.

This is somewhat compounded by the fact that the error message does not have a stacktrace, so it is not easy for a user to figure out what is wrong:

julia> addprocs_lsf(10; retry_delays = Base.Iterators.cycle(5))
Error launching workers
MethodError(getindex, (nothing, 1), 0x00000000000073d6)
Int64[]

Is the intention of the line to just catch when there are no more backoffs to try? If so, why not just check for when iterator returns nothing or rewrite loop to use iterator?