feat: worker: lotus-worker run --no-default
This commit is contained in:
parent
33a05d33a9
commit
6b3bc8c9d2
@ -182,12 +182,16 @@ var runCmd = &cli.Command{
|
|||||||
Usage: "enable window post",
|
Usage: "enable window post",
|
||||||
Value: false,
|
Value: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "winningpost",
|
Name: "winningpost",
|
||||||
Usage: "enable winning post",
|
Usage: "enable winning post",
|
||||||
Value: false,
|
Value: false,
|
||||||
},
|
},
|
||||||
|
&cli.BoolFlag{
|
||||||
|
Name: "no-default",
|
||||||
|
Usage: "disable all default tasks, use the worker for storage only",
|
||||||
|
Value: false,
|
||||||
|
},
|
||||||
&cli.IntFlag{
|
&cli.IntFlag{
|
||||||
Name: "parallel-fetch-limit",
|
Name: "parallel-fetch-limit",
|
||||||
Usage: "maximum fetch operations to run in parallel",
|
Usage: "maximum fetch operations to run in parallel",
|
||||||
@ -308,8 +312,11 @@ var runCmd = &cli.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if workerType == "" {
|
if workerType == "" {
|
||||||
workerType = sealtasks.WorkerSealing
|
|
||||||
taskTypes = append(taskTypes, sealtasks.TTFetch, sealtasks.TTCommit1, sealtasks.TTProveReplicaUpdate1, sealtasks.TTFinalize, sealtasks.TTFinalizeReplicaUpdate)
|
taskTypes = append(taskTypes, sealtasks.TTFetch, sealtasks.TTCommit1, sealtasks.TTProveReplicaUpdate1, sealtasks.TTFinalize, sealtasks.TTFinalizeReplicaUpdate)
|
||||||
|
|
||||||
|
if !cctx.Bool("no-default") {
|
||||||
|
workerType = sealtasks.WorkerSealing
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (workerType == sealtasks.WorkerSealing || cctx.IsSet("addpiece")) && cctx.Bool("addpiece") {
|
if (workerType == sealtasks.WorkerSealing || cctx.IsSet("addpiece")) && cctx.Bool("addpiece") {
|
||||||
@ -337,6 +344,10 @@ var runCmd = &cli.Command{
|
|||||||
taskTypes = append(taskTypes, sealtasks.TTRegenSectorKey)
|
taskTypes = append(taskTypes, sealtasks.TTRegenSectorKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if cctx.Bool("no-default") && workerType == "" {
|
||||||
|
workerType = sealtasks.WorkerSealing
|
||||||
|
}
|
||||||
|
|
||||||
if len(taskTypes) == 0 {
|
if len(taskTypes) == 0 {
|
||||||
return xerrors.Errorf("no task types specified")
|
return xerrors.Errorf("no task types specified")
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,7 @@ OPTIONS:
|
|||||||
--regen-sector-key enable regen sector key (default: true)
|
--regen-sector-key enable regen sector key (default: true)
|
||||||
--windowpost enable window post (default: false)
|
--windowpost enable window post (default: false)
|
||||||
--winningpost enable winning post (default: false)
|
--winningpost enable winning post (default: false)
|
||||||
|
--no-default disable all default tasks, use the worker for storage only (default: false)
|
||||||
--parallel-fetch-limit value maximum fetch operations to run in parallel (default: 5)
|
--parallel-fetch-limit value maximum fetch operations to run in parallel (default: 5)
|
||||||
--post-parallel-reads value maximum number of parallel challenge reads (0 = no limit) (default: 128)
|
--post-parallel-reads value maximum number of parallel challenge reads (0 = no limit) (default: 128)
|
||||||
--post-read-timeout value time limit for reading PoSt challenges (0 = no limit) (default: 0s)
|
--post-read-timeout value time limit for reading PoSt challenges (0 = no limit) (default: 0s)
|
||||||
|
Loading…
Reference in New Issue
Block a user