Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Conversation

bwplotka
Copy link
Contributor

No description provided.

if (totalAgentCpus.isNone()) {
return Error(std::string(NAME) + " No total cpus in ResourceUsage");
SERENITY_LOG(ERROR) << std::string(NAME)
<< " No total cpus in ResourceUsage";
Copy link
Contributor

Choose a reason for hiding this comment

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

Indent here?

@skonefal
Copy link
Contributor

How about making SerenityConfig immutable?
It should be used to support config from external locations like configuration file or HTTP endpoint.

Make all set methods protected and make getSection method to return Option.
Config class would also be responsible for creating config from JSON.

@bwplotka
Copy link
Contributor Author

That will make SerenityConfig incredible hard to test.. ):

@bwplotka bwplotka closed this Feb 17, 2016
@bwplotka bwplotka reopened this Feb 17, 2016
@bwplotka bwplotka changed the title WIP: Refactored SerenityConfig Refactored SerenityConfig Feb 17, 2016
@skonefal
Copy link
Contributor

No, for test purposes we would just need to inherit a FakeSerenityConfig class (and test trough this) or be-friend the testing class (might be even better).

if (!inExec.has_executor_info()) {
SERENITY_LOG(ERROR) << "Executor <unknown>"
<< " does not include executor_info";
// Filter out these executors.
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment no longer apply here. And bellow.
Comments lie all the times.

*/
* Variant type for storing multiple types of data in configuration.
*/
using CfgVariant = boost::variant<
Copy link
Contributor

Choose a reason for hiding this comment

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

How about Value?
Storing 'variant' in name suggest internal structure that backs the field. When we will change the Variant class to something else, do we also want to change name there?

@skonefal
Copy link
Contributor

Nice work with putting docstrings in your APIs. One day we could enable #80 ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants