Skip to content

Commit

Permalink
Use roles after standard config is set
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr Samylkin committed Mar 30, 2017
1 parent 7dfb9e5 commit a11f564
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions service/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ func newManager(builder *Builder) (Manager, error) {
moduleWrappers: []*moduleWrapper{},
serviceCore: serviceCore{},
}
m.roles = map[string]bool{}
for _, r := range m.standardConfig.Roles {
m.roles[r] = true
}
for _, opt := range builder.options {
if optionErr := opt(m); optionErr != nil {
return nil, errors.Wrap(optionErr, "option failed to apply")
Expand All @@ -88,6 +84,12 @@ func newManager(builder *Builder) (Manager, error) {
if err := m.setupStandardConfig(); err != nil {
return nil, err
}

m.roles = map[string]bool{}
for _, r := range m.standardConfig.Roles {
m.roles[r] = true
}

// Initialize metrics. If no metrics reporters were Registered, do nop
// TODO(glib): add a logging reporter and use it by default, rather than nop
m.setupMetrics()
Expand Down

0 comments on commit a11f564

Please sign in to comment.