lp config from-miner flag name now --to-layer

This commit is contained in:
Andrew Jackson (Ajax) 2023-11-09 10:57:57 -06:00
parent b0cb4b56d6
commit 05cd57a7a9

View File

@ -34,14 +34,14 @@ var configMigrateCmd = &cli.Command{
Usage: fmt.Sprintf("Specify miner repo path. flag(%s) and env(LOTUS_STORAGE_PATH) are DEPRECATION, will REMOVE SOON", FlagMinerRepoDeprecation), Usage: fmt.Sprintf("Specify miner repo path. flag(%s) and env(LOTUS_STORAGE_PATH) are DEPRECATION, will REMOVE SOON", FlagMinerRepoDeprecation),
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "layer", Name: "to-layer",
Aliases: []string{"l"}, Aliases: []string{"t"},
Usage: "The layer name for this data push. 'base' is recommended for single-miner setup.", Usage: "The layer name for this data push. 'base' is recommended for single-miner setup.",
}, },
&cli.BoolFlag{ &cli.BoolFlag{
Name: "overwrite", Name: "replace",
Aliases: []string{"o"}, Aliases: []string{"r"},
Usage: "Use this with layer to overwrite an existing layer", Usage: "Use this with --to-layer to replace an existing layer",
}, },
}, },
Action: fromMiner, Action: fromMiner,
@ -94,7 +94,7 @@ func fromMiner(cctx *cli.Context) (err error) {
return fmt.Errorf("miner cannot reach the db. Ensure the config toml's HarmonyDB entry"+ return fmt.Errorf("miner cannot reach the db. Ensure the config toml's HarmonyDB entry"+
" is setup to reach Yugabyte correctly: %s", err.Error()) " is setup to reach Yugabyte correctly: %s", err.Error())
} }
name := cctx.String("layer") name := cctx.String("to-layer")
if name == "" { if name == "" {
name = fmt.Sprintf("mig%d", len(titles)) name = fmt.Sprintf("mig%d", len(titles))
} else { } else {