Skip to content

Commit

Permalink
fix: fix new piece store and spdb (#460)
Browse files Browse the repository at this point in the history
Co-authored-by: VM <arimas@foxmail.com>
  • Loading branch information
sysvm and VM authored May 24, 2023
1 parent 173c9e9 commit 383e091
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions base/gfspapp/app_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ func DefaultGfSpDBOption(app *GfSpBaseApp, cfg *gfspconfig.GfSpConfig) error {
dbCfg := &cfg.SpDB
db, err := sqldb.NewSpDB(dbCfg)
if err != nil {
return err
log.Warnw("if not use spdb, please ignore: failed to new spdb", "error", err)
return nil
}
app.gfSpDB = db
return nil
Expand Down Expand Up @@ -225,7 +226,8 @@ func DefaultGfSpPieceStoreOption(app *GfSpBaseApp, cfg *gfspconfig.GfSpConfig) e
}
pieceStore, err := piecestoreclient.NewStoreClient(&cfg.PieceStore)
if err != nil {
return err
log.Warnw("if not use piece store, please ignore: failed to new piece store", "error", err)
return nil
}
app.pieceStore = pieceStore
return nil
Expand Down

0 comments on commit 383e091

Please sign in to comment.