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

System props #1601

Merged
merged 4 commits into from
May 25, 2022
Merged

System props #1601

merged 4 commits into from
May 25, 2022

Conversation

rogeralsing
Copy link
Contributor

PoC, allow configuring system actor props

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Roger Johansson seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@@ -70,6 +70,25 @@ public PID SpawnNamed(Props props, string name)
throw;
}
}

public PID SpawnNamedSystem(Props props, string name)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this should be moved somewhere else to not clutter RootContext.
Maybe an extension method

/// </summary>
public Func<string, Props, Props> ConfigureSystemProps { get; init; } = (_,props) => props
.WithDeadlineDecorator(TimeSpan.FromSeconds(1))
.WithLoggingContextDecorator()
Copy link
Member

Choose a reason for hiding this comment

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

If we should use a logging decorator by default, should we reduce the log level for messages to trace?
This could quickly become very noisy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, I've set the loglevel to None. but using Information for system/infra messages, and Error for anything that throws

}
catch (Exception x)
{
Logger.LogError(x, "RootContext Failed to spawn child actor {Name}", name);
Copy link
Member

Choose a reason for hiding this comment

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

Throw wrapped in inner exception instead?

It's also spawned in root context, not a child actor

@rogeralsing rogeralsing merged commit ebf1afa into dev May 25, 2022
@rogeralsing rogeralsing deleted the system_props branch May 25, 2022 08:43
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.

3 participants