Merge pull request #11177 from filecoin-project/sbansal/unseal-background
fix: sealing: Run unsealing in the background for better ux
This commit is contained in:
commit
cb7231cb8a
@ -278,7 +278,16 @@ func (sm *StorageMinerAPI) SectorUnseal(ctx context.Context, sectorNum abi.Secto
|
||||
ProofType: status.SealProof,
|
||||
}
|
||||
|
||||
return sm.StorageMgr.SectorsUnsealPiece(ctx, sector, storiface.UnpaddedByteIndex(0), abi.UnpaddedPieceSize(0), status.Ticket.Value, status.CommD)
|
||||
bgCtx := context.Background()
|
||||
|
||||
go func() {
|
||||
err := sm.StorageMgr.SectorsUnsealPiece(bgCtx, sector, storiface.UnpaddedByteIndex(0), abi.UnpaddedPieceSize(0), status.Ticket.Value, status.CommD)
|
||||
if err != nil {
|
||||
log.Errorf("unseal for sector %d failed: %+v", sectorNum, err)
|
||||
}
|
||||
}()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// List all staged sectors
|
||||
|
Loading…
Reference in New Issue
Block a user