Run unsealing in the background for better ux
This commit is contained in:
parent
33182967eb
commit
38350b8d8a
@ -278,7 +278,13 @@ 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() {
|
||||
sm.StorageMgr.SectorsUnsealPiece(bgCtx, sector, storiface.UnpaddedByteIndex(0), abi.UnpaddedPieceSize(0), status.Ticket.Value, status.CommD)
|
||||
}()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// List all staged sectors
|
||||
|
Loading…
Reference in New Issue
Block a user