log errors when closing all paths instead of stopping execution
This commit is contained in:
parent
10dba44638
commit
4d10487463
@ -2,6 +2,7 @@ package sealworker
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
logging "github.com/ipfs/go-log/v2"
|
||||||
"net/http"
|
"net/http"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
|
|
||||||
@ -23,6 +24,8 @@ import (
|
|||||||
"github.com/filecoin-project/lotus/storage/sealer/storiface"
|
"github.com/filecoin-project/lotus/storage/sealer/storiface"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var log = logging.Logger("sealworker")
|
||||||
|
|
||||||
func WorkerHandler(authv func(ctx context.Context, token string) ([]auth.Permission, error), remote http.HandlerFunc, a api.Worker, permissioned bool) http.Handler {
|
func WorkerHandler(authv func(ctx context.Context, token string) ([]auth.Permission, error), remote http.HandlerFunc, a api.Worker, permissioned bool) http.Handler {
|
||||||
mux := mux.NewRouter()
|
mux := mux.NewRouter()
|
||||||
readerHandler, readerServerOpt := rpcenc.ReaderParamDecoder()
|
readerHandler, readerServerOpt := rpcenc.ReaderParamDecoder()
|
||||||
@ -156,7 +159,7 @@ func (w *Worker) StorageDetachAll(ctx context.Context) error {
|
|||||||
for _, lp := range lps {
|
for _, lp := range lps {
|
||||||
err = w.LocalStore.ClosePath(ctx, lp.ID)
|
err = w.LocalStore.ClosePath(ctx, lp.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("unable to close path: %w", err)
|
log.Warnf("unable to close path: %w", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user