Cockroach Store bugfix (#1401)

This commit is contained in:
Jake Sanders 2020-03-24 17:16:38 +00:00 committed by GitHub
parent eb4d2ae6aa
commit 397a8638f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View File

@ -616,7 +616,7 @@ func (c *cmd) Before(ctx *cli.Context) error {
} }
if len(ctx.String("store_namespace")) > 0 { if len(ctx.String("store_namespace")) > 0 {
if err := (*c.opts.Store).Init(store.Namespace(ctx.String("store_address"))); err != nil { if err := (*c.opts.Store).Init(store.Namespace(ctx.String("store_namespace"))); err != nil {
logger.Fatalf("Error configuring store: %v", err) logger.Fatalf("Error configuring store: %v", err)
} }
} }

View File

@ -10,7 +10,6 @@ import (
"time" "time"
"github.com/lib/pq" "github.com/lib/pq"
"github.com/micro/go-micro/v2/logger"
"github.com/micro/go-micro/v2/store" "github.com/micro/go-micro/v2/store"
"github.com/pkg/errors" "github.com/pkg/errors"
) )
@ -370,10 +369,8 @@ func NewStore(opts ...store.Option) store.Store {
// set the options // set the options
s.options = options s.options = options
// configure the store // best-effort configure the store
if err := s.configure(); err != nil { s.configure()
logger.Fatal(err)
}
// return store // return store
return s return s