Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macro based on retries #3

Open
vertexclique opened this issue Oct 27, 2019 · 4 comments
Open

Macro based on retries #3

vertexclique opened this issue Oct 27, 2019 · 4 comments

Comments

@vertexclique
Copy link
Member

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
@cptrodgers cptrodgers self-assigned this Oct 29, 2019
@cptrodgers
Copy link
Contributor

I will take this issue. @vertexclique

@cptrodgers cptrodgers removed their assignment Dec 26, 2019
@imkow
Copy link

imkow commented Feb 14, 2020

what's going on with this?

@vertexclique
Copy link
Member Author

@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.

@imkow
Copy link

imkow commented Feb 16, 2020

@vertexclique thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants