Skip to content

Commit

Permalink
Added example JSON for airflow pools import (#18376)
Browse files Browse the repository at this point in the history
Co-authored-by: Bas Harenslak <[email protected]>
  • Loading branch information
BasPH and BasPH authored Sep 20, 2021
1 parent a9772cf commit ef0ff3f
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion airflow/cli/cli_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,22 @@ def _check(value):
ARG_POOL_NAME = Arg(("pool",), metavar='NAME', help="Pool name")
ARG_POOL_SLOTS = Arg(("slots",), type=int, help="Pool slots")
ARG_POOL_DESCRIPTION = Arg(("description",), help="Pool description")
ARG_POOL_IMPORT = Arg(("file",), metavar="FILEPATH", help="Import pools from JSON file")
ARG_POOL_IMPORT = Arg(
("file",),
metavar="FILEPATH",
help="Import pools from JSON file. Example format::\n"
+ textwrap.indent(
textwrap.dedent(
'''
{
"pool_1": {"slots": 5, "description": ""},
"pool_2": {"slots": 10, "description": "test"}
}'''
),
" " * 4,
),
)

ARG_POOL_EXPORT = Arg(("file",), metavar="FILEPATH", help="Export all pools to JSON file")

# variables
Expand Down

0 comments on commit ef0ff3f

Please sign in to comment.