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

feat(core): the restarting policy can be overridden via configuration for each actor. #118

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

sargarass
Copy link
Contributor

@sargarass sargarass commented Dec 14, 2023

RestartParams have been added for RestartPolicy::always(..) and RestartPolicy::on_failure(..).
The linear backoff has been replaced with an exponential approach, with a configurable limit for restarts.

BREAKING CHANGE: The default RestartPolicy is set to RestartPolicy::never(), RestartPolicy::always and RestartPolicy::on_failure have args .

@sargarass sargarass force-pushed the master branch 12 times, most recently from 39a6943 to 7e8b100 Compare December 15, 2023 16:24
elfo-network/src/lib.rs Outdated Show resolved Hide resolved
elfo-core/src/config.rs Outdated Show resolved Hide resolved
elfo-core/src/context.rs Outdated Show resolved Hide resolved
elfo-core/src/restarting/restart_policy.rs Outdated Show resolved Hide resolved
elfo-core/src/restarting/restart_policy.rs Outdated Show resolved Hide resolved
elfo-core/src/actor.rs Show resolved Hide resolved
elfo-core/src/restarting/config.rs Outdated Show resolved Hide resolved
elfo/tests/restarting.rs Show resolved Hide resolved
elfo-core/src/supervisor/backoff.rs Outdated Show resolved Hide resolved
elfo-core/src/supervisor.rs Outdated Show resolved Hide resolved
elfo-core/src/supervisor.rs Outdated Show resolved Hide resolved
@sargarass sargarass force-pushed the master branch 13 times, most recently from 6191d9f to e164220 Compare December 18, 2023 20:51
@sargarass sargarass force-pushed the master branch 5 times, most recently from 1c2bdba to 7dc7296 Compare December 20, 2023 15:41

use crate::ActorStatus;

/// The behaviour on actor termination.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sounds like TerminationPolicy

@sargarass sargarass force-pushed the master branch 2 times, most recently from 3178ea5 to abe5fc7 Compare December 20, 2023 19:07
… for each actor.

`RestartParams` have been added for `RestartPolicy::always(..)` and `RestartPolicy::on_failure(..)`. The linear backoff has been replaced with an exponential approach, with a configurable limit for restarts.

BREAKING CHANGE: The default RestartPolicy is set to `RestartPolicy::never()`.
@loyd loyd merged commit 3ffa76d into elfo-rs:master Dec 20, 2023
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants