Skip to content

Commit

Permalink
Support execution config with no task priority
Browse files Browse the repository at this point in the history
  • Loading branch information
EpicWink committed Sep 8, 2022
1 parent 8c707d1 commit 38cb342
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/swf_typed/_executions.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ExecutionStatus(enum.Enum):

open = "OPEN"
"""Execution is in-progress."""

started = "OPEN"
"""Execution is in-progress."""

Expand Down Expand Up @@ -150,12 +150,12 @@ class ExecutionConfiguration(_common.Deserialisable):
decision_task_list: str
"""Decision task task-list."""

decision_task_priority: int
"""Decision task priority."""

child_execution_policy_on_termination: ChildExecutionTerminationPolicy
"""Child workflow execution ending policy on termination."""

decision_task_priority: int = None
"""Decision task priority."""

lambda_iam_role_arn: str = None
"""Execution IAM role ARN for Lambda invocations."""

Expand All @@ -167,7 +167,9 @@ def from_api(cls, data) -> "ExecutionConfiguration":
timeout=_common.parse_timeout(data["executionStartToCloseTimeout"]),
decision_task_timeout=decision_task_timeout,
decision_task_list=data["taskList"]["name"],
decision_task_priority=int(data["taskPriority"]),
decision_task_priority=(
data.get("taskPriority") and int(data["taskPriority"])
),
child_execution_policy_on_termination=child_policy,
lambda_iam_role_arn=data.get("lambdaRole"),
)
Expand Down

0 comments on commit 38cb342

Please sign in to comment.