Macro based on retries
vertexclique opened this issue · comments
Theo M. Bulut commented
The macro should enable how many times a process can be restarted.
#[fort::root(max_retries=4)]
fn main {
panic!("Killed");
}
Process output
Killed
Killed
Killed
Killed
Hien Nguyen (Rodgers) commented
I will take this issue. @vertexclique
Jack commented
what's going on with this?
Theo M. Bulut commented
@imkow This feature went inside with Bastion itself:
https://docs.rs/bastion/0.3.4/bastion/supervisor/struct.RestartStrategy.html
/// # use std::time::Duration;
/// # let actor_restart_strategy = ActorRestartStrategy::LinearBackOff {
/// # timeout: Duration::from_secs(5)
/// # };
/// # let restart_strategy = RestartStrategy::default()
/// # .with_actor_restart_strategy(actor_restart_strategy);
We will add this to fort asap. RestartStrategy::Tries
is what you want to use.
Jack commented
@vertexclique thx