Merge pull request #10797 from filecoin-project/sealerFlagForDataCid3
feat: sealing: flag to run data_cid untied from addpiece
This commit is contained in:
commit
3b4fa779ac
@ -275,6 +275,12 @@ var runCmd = &cli.Command{
|
|||||||
Name: "http-server-timeout",
|
Name: "http-server-timeout",
|
||||||
Value: "30s",
|
Value: "30s",
|
||||||
},
|
},
|
||||||
|
&cli.BoolFlag{
|
||||||
|
Name: "data-cid",
|
||||||
|
Usage: "Run the data-cid task. true|false",
|
||||||
|
Value: true,
|
||||||
|
DefaultText: "inherits --addpiece",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Before: func(cctx *cli.Context) error {
|
Before: func(cctx *cli.Context) error {
|
||||||
if cctx.IsSet("address") {
|
if cctx.IsSet("address") {
|
||||||
@ -386,8 +392,19 @@ var runCmd = &cli.Command{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ttDataCidDefault := false
|
||||||
if (workerType == sealtasks.WorkerSealing || cctx.IsSet("addpiece")) && cctx.Bool("addpiece") {
|
if (workerType == sealtasks.WorkerSealing || cctx.IsSet("addpiece")) && cctx.Bool("addpiece") {
|
||||||
taskTypes = append(taskTypes, sealtasks.TTAddPiece, sealtasks.TTDataCid)
|
taskTypes = append(taskTypes, sealtasks.TTAddPiece)
|
||||||
|
ttDataCidDefault = true
|
||||||
|
}
|
||||||
|
if workerType == sealtasks.WorkerSealing {
|
||||||
|
if cctx.IsSet("data-cid") {
|
||||||
|
if cctx.Bool("data-cid") {
|
||||||
|
taskTypes = append(taskTypes, sealtasks.TTDataCid)
|
||||||
|
}
|
||||||
|
} else if ttDataCidDefault {
|
||||||
|
taskTypes = append(taskTypes, sealtasks.TTDataCid)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (workerType == sealtasks.WorkerSealing || cctx.IsSet("sector-download")) && cctx.Bool("sector-download") {
|
if (workerType == sealtasks.WorkerSealing || cctx.IsSet("sector-download")) && cctx.Bool("sector-download") {
|
||||||
taskTypes = append(taskTypes, sealtasks.TTDownloadSector)
|
taskTypes = append(taskTypes, sealtasks.TTDownloadSector)
|
||||||
|
@ -38,6 +38,7 @@ USAGE:
|
|||||||
OPTIONS:
|
OPTIONS:
|
||||||
--addpiece enable addpiece (default: true) [$LOTUS_WORKER_ADDPIECE]
|
--addpiece enable addpiece (default: true) [$LOTUS_WORKER_ADDPIECE]
|
||||||
--commit enable commit (default: true) [$LOTUS_WORKER_COMMIT]
|
--commit enable commit (default: true) [$LOTUS_WORKER_COMMIT]
|
||||||
|
--data-cid Run the data-cid task. true|false (default: inherits --addpiece)
|
||||||
--http-server-timeout value (default: "30s")
|
--http-server-timeout value (default: "30s")
|
||||||
--listen value host address and port the worker api will listen on (default: "0.0.0.0:3456") [$LOTUS_WORKER_LISTEN]
|
--listen value host address and port the worker api will listen on (default: "0.0.0.0:3456") [$LOTUS_WORKER_LISTEN]
|
||||||
--name value custom worker name (default: hostname) [$LOTUS_WORKER_NAME]
|
--name value custom worker name (default: hostname) [$LOTUS_WORKER_NAME]
|
||||||
|
Loading…
Reference in New Issue
Block a user