From 38cb342d600563d3b55cd033f73d9bd7a17153de Mon Sep 17 00:00:00 2001 From: Laurie O Date: Thu, 8 Sep 2022 14:43:18 +1000 Subject: [PATCH] Support execution config with no task priority --- src/swf_typed/_executions.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/swf_typed/_executions.py b/src/swf_typed/_executions.py index 83250fa..04a28ea 100644 --- a/src/swf_typed/_executions.py +++ b/src/swf_typed/_executions.py @@ -54,7 +54,7 @@ class ExecutionStatus(enum.Enum): open = "OPEN" """Execution is in-progress.""" - + started = "OPEN" """Execution is in-progress.""" @@ -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.""" @@ -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"), )