fort
fort copied to clipboard
Macro based on retries
trafficstars
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
I will take this issue. @vertexclique
what's going on with this?
@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.
@vertexclique thx