Skip to content

Commit

Permalink
hadmin-server: update cli help info for meta get-task command
Browse files Browse the repository at this point in the history
  • Loading branch information
YangKian committed Jun 3, 2024
1 parent 86f49e7 commit ecc1fbe
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions hstream-admin/server/HStream/Admin/Server/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ metaCmdParser = O.hsubparser
<> O.short 'r'
<> O.metavar "RESOURCE_CATEGORY"
<> O.help ("The category of the resource, currently support: "
<> "[subscription|query-info|query-status|view-info|qv-relation|connector|connector-info]"))
<> "[subscription|query-info|query-status|view-info|qv-relation|connector|connector-info]"))
<*> O.strOption ( O.long "id"
<> O.short 'i'
<> O.metavar "RESOURCE_ID"
Expand All @@ -301,14 +301,6 @@ metaCmdParser = O.hsubparser
O.<|> MetaCmdTask <$> metaTaskCmdParser
O.<|> MetaCmdClean <$> metaCleanCmdParser

data MetaCleanCommand = CleanConnectors
deriving (Show)

metaCleanCmdParser :: O.Parser MetaCleanCommand
metaCleanCmdParser = O.hsubparser
( O.command "clean-connectors" (O.info (pure CleanConnectors) (O.progDesc "Clean up the taskMeta of connectors in deleted state."))
)

data MetaTaskCommand
= MetaTaskGet Text Text
deriving (Show)
Expand All @@ -318,14 +310,23 @@ metaTaskCmdParser = O.hsubparser
( O.command "get-task" (O.info (MetaTaskGet <$> O.strOption ( O.long "resource"
<> O.short 'r'
<> O.metavar "RESOURCE_CATEGORY"
<> O.help "The category of the resource")
<> O.help ("The category of the resource, currently support: "
<> "[stream|subscription|query|view|connector|shard|shard-reader]"))
<*> O.strOption ( O.long "id"
<> O.short 'i'
<> O.metavar "RESOURCE_ID"
<> O.help "The Id of the resource"))
(O.progDesc "Get task allocation metadata of specific resource"))
)

data MetaCleanCommand = CleanConnectors
deriving (Show)

metaCleanCmdParser :: O.Parser MetaCleanCommand
metaCleanCmdParser = O.hsubparser
( O.command "clean-connectors" (O.info (pure CleanConnectors) (O.progDesc "Clean up the taskMeta of connectors in deleted state."))
)

-------------------------------------------------------------------------------

-- TODO: auto generate from commom/stats/include/*.inc
Expand Down

0 comments on commit ecc1fbe

Please sign in to comment.