Skip to content

Commit

Permalink
Add canceling state to tasks
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
mdellweg committed Jun 18, 2021
1 parent 31de739 commit 7b69a38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pulpcore/cli/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
click.option(
"--state",
type=click.Choice(
["waiting", "skipped", "running", "completed", "failed", "canceled"],
["waiting", "skipped", "running", "completed", "failed", "canceled", "canceling"],
case_sensitive=False,
),
help=_("List only tasks in this state."),
Expand Down
2 changes: 1 addition & 1 deletion pulpcore/cli/core/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def task(ctx: click.Context, pulp_ctx: PulpContext) -> None:
def show(pulp_ctx: PulpContext, task_ctx: PulpTaskContext, href: str, wait: bool) -> None:
"""Shows details of a task."""
entity = task_ctx.show(href)
if wait and entity["state"] in ["waiting", "running"]:
if wait and entity["state"] in ["waiting", "running", "canceling"]:
click.echo(f"Waiting for task {href} to finish.", err=True)
entity = pulp_ctx.wait_for_task(entity)
pulp_ctx.output_result(entity)
Expand Down

0 comments on commit 7b69a38

Please sign in to comment.