Skip to content

Commit e43d557

Browse files
committed
Fix success check
1 parent fdf3a2b commit e43d557

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bioblend/galaxy/invocations/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424

2525
log = logging.getLogger(__name__)
2626

27-
INVOCATION_TERMINAL_STATES = {"cancelled", "completed", "failed", "scheduled"}
27+
INVOCATION_SUCCESS_STATES = {"scheduled", "completed"}
28+
INVOCATION_TERMINAL_STATES = INVOCATION_SUCCESS_STATES | {"cancelled", "failed"}
2829
# Invocation non-terminal states are: "cancelling", "new", "ready"
2930

3031

@@ -631,7 +632,7 @@ def check_and_get_invocation() -> dict[str, Any]:
631632
invocation = self.gi.invocations.show_invocation(invocation_id)
632633
state = invocation["state"]
633634
if state in INVOCATION_TERMINAL_STATES:
634-
if check and state != "scheduled":
635+
if check and state not in INVOCATION_SUCCESS_STATES:
635636
raise Exception(f"Invocation {invocation_id} is in terminal state {state}")
636637
return invocation
637638
raise NotReady(f"Invocation {invocation_id} is in non-terminal state {state}")

0 commit comments

Comments
 (0)