Tarearbol.ensure
You're seeing just the function
ensure
, go back to Tarearbol module for more information.
Specs
Ensures the task to be completed; restarts it when necessary.
Possible options:
attempts
[default::infinity
] Might be any of@Tarearbol.Utils.interval
type (5
for five attempts,:random
for the random amount etc)delay
[default:1 msec
]. Might be any of@Tarearbol.Utils.interval
type (1_000
or1.0
for one second,:timeout
for five seconds etc)on_success
[default:nil
], the function to be called on successful execution (arity ∈ [0, 1]
or tuple{Mod, fun}
wherefun
is of arity zero or one.) When the arity of given function is1
, the result of task execution is passedon_retry
[default:nil
], same as above, called on retries after insuccessful attempts or one of[:debug, :info, :warn, :error]
atoms to log a retry with default loggeron_fail
[default:nil
], same as above, called when the task finally failed afterattempts
amount of insuccessful attempts