worker: Support setting task types at runtime
This commit is contained in:
@@ -388,6 +388,9 @@ type WorkerStruct struct {
|
||||
ReadPiece func(context.Context, io.Writer, storage.SectorRef, storiface.UnpaddedByteIndex, abi.UnpaddedPieceSize) (storiface.CallID, error) `perm:"admin"`
|
||||
Fetch func(context.Context, storage.SectorRef, storiface.SectorFileType, storiface.PathType, storiface.AcquireMode) (storiface.CallID, error) `perm:"admin"`
|
||||
|
||||
DisableTask func(ctx context.Context, tt sealtasks.TaskType) error
|
||||
EnableTask func(ctx context.Context, tt sealtasks.TaskType) error
|
||||
|
||||
Remove func(ctx context.Context, sector abi.SectorID) error `perm:"admin"`
|
||||
StorageAddLocal func(ctx context.Context, path string) error `perm:"admin"`
|
||||
|
||||
@@ -1573,6 +1576,14 @@ func (w *WorkerStruct) Fetch(ctx context.Context, id storage.SectorRef, fileType
|
||||
return w.Internal.Fetch(ctx, id, fileType, ptype, am)
|
||||
}
|
||||
|
||||
func (w *WorkerStruct) DisableTask(ctx context.Context, tt sealtasks.TaskType) error {
|
||||
return w.Internal.DisableTask(ctx, tt)
|
||||
}
|
||||
|
||||
func (w *WorkerStruct) EnableTask(ctx context.Context, tt sealtasks.TaskType) error {
|
||||
return w.Internal.EnableTask(ctx, tt)
|
||||
}
|
||||
|
||||
func (w *WorkerStruct) Remove(ctx context.Context, sector abi.SectorID) error {
|
||||
return w.Internal.Remove(ctx, sector)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user