Skip to content

Commit

Permalink
fix: fix new piece store and spdb
Browse files Browse the repository at this point in the history
  • Loading branch information
VM committed May 24, 2023
1 parent 173c9e9 commit 8efac4b
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 8efac4b

Please sign in to comment.