Skip to content

Commit

Permalink
nsqd: load metadata inside New()
Browse files Browse the repository at this point in the history
  • Loading branch information
mreiferson committed Oct 18, 2015
1 parent 8ba7f9e commit 3ba4d1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions apps/nsqd/nsqd.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,6 @@ func main() {
opts := nsqd.NewOptions()
options.Resolve(opts, flagSet, cfg)
nsqd := nsqd.New(opts)

nsqd.LoadMetadata()
err := nsqd.PersistMetadata()
if err != nil {
log.Fatalf("ERROR: failed to persist metadata - %s", err.Error())
Expand Down
2 changes: 2 additions & 0 deletions nsqd/nsqd.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ func New(opts *Options) *NSQD {
n.logf(version.String("nsqd"))
n.logf("ID: %d", opts.ID)

n.LoadMetadata()

return n
}

Expand Down

0 comments on commit 3ba4d1b

Please sign in to comment.