From 8efac4b68f71a20692c6dc3db42dfbe1c6dee1fa Mon Sep 17 00:00:00 2001 From: VM Date: Wed, 24 May 2023 10:49:49 +0800 Subject: [PATCH] fix: fix new piece store and spdb --- base/gfspapp/app_options.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/base/gfspapp/app_options.go b/base/gfspapp/app_options.go index 36c049304..77b398682 100644 --- a/base/gfspapp/app_options.go +++ b/base/gfspapp/app_options.go @@ -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 @@ -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