aws-durable-execution-sdk-python-testing 1.0.0.post1__py3-none-any.whl → 1.0.0.post2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  # SPDX-FileCopyrightText: 2025-present Amazon.com, Inc. or its affiliates.
2
2
  #
3
3
  # SPDX-License-Identifier: Apache-2.0
4
- __version__ = "1.0.0.post1"
4
+ __version__ = "1.0.0.post2"
@@ -90,6 +90,7 @@ class Executor(ExecutionObserver):
90
90
  self._completion_events: dict[str, Event] = {}
91
91
  self._callback_timeouts: dict[str, Future] = {}
92
92
  self._callback_heartbeats: dict[str, Future] = {}
93
+ self._execution_timeout: Future | None = None
93
94
 
94
95
  def start_execution(
95
96
  self,
@@ -118,6 +119,21 @@ class Executor(ExecutionObserver):
118
119
  completion_event = self._scheduler.create_event()
119
120
  self._completion_events[execution.durable_execution_arn] = completion_event
120
121
 
122
+ # Schedule execution timeout
123
+ if input.execution_timeout_seconds > 0:
124
+
125
+ def timeout_handler():
126
+ error = ErrorObject.from_message(
127
+ f"Execution timed out after {input.execution_timeout_seconds} seconds."
128
+ )
129
+ self.on_timed_out(execution.durable_execution_arn, error)
130
+
131
+ self._execution_timeout = self._scheduler.call_later(
132
+ timeout_handler,
133
+ delay=input.execution_timeout_seconds,
134
+ completion_event=completion_event,
135
+ )
136
+
121
137
  # Schedule initial invocation to run immediately
122
138
  self._invoke_execution(execution.durable_execution_arn)
123
139
 
@@ -897,6 +913,9 @@ class Executor(ExecutionObserver):
897
913
  # complete doesn't actually checkpoint explicitly
898
914
  if event := self._completion_events.get(execution_arn):
899
915
  event.set()
916
+ if self._execution_timeout:
917
+ self._execution_timeout.cancel()
918
+ self._execution_timeout = None
900
919
 
901
920
  def wait_until_complete(
902
921
  self, execution_arn: str, timeout: float | None = None
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aws-durable-execution-sdk-python-testing
3
- Version: 1.0.0.post1
4
- Summary: This is the Python SDK for AWS Lambda Durable Execution.
3
+ Version: 1.0.0.post2
4
+ Summary: AWS Durable Execution Testing SDK for Python
5
5
  Project-URL: Documentation, https://github.com/aws/aws-durable-execution-sdk-python-testing#readme
6
6
  Project-URL: Issues, https://github.com/aws/aws-durable-execution-sdk-python-testing/issues
7
7
  Project-URL: Source, https://github.com/aws/aws-durable-execution-sdk-python-testing
@@ -1,10 +1,10 @@
1
- aws_durable_execution_sdk_python_testing/__about__.py,sha256=-QmpfYZ9pdzdlPWSCZhi8XGdOo1gGVCvVKZw7LcRN4Q,143
1
+ aws_durable_execution_sdk_python_testing/__about__.py,sha256=icsd0Hm3ExC9nsYcXwOBxr9ryFp3jEaNqIW2ER6bwpU,143
2
2
  aws_durable_execution_sdk_python_testing/__init__.py,sha256=bNtlkAlTpEvWJlUyFHcadozQfnb0PjnDze6upzJiog4,483
3
3
  aws_durable_execution_sdk_python_testing/cli.py,sha256=zGfKftKBd2p7zk8chOgpi4Ft6cnls0TG5vo0CZm-xKs,19137
4
4
  aws_durable_execution_sdk_python_testing/client.py,sha256=1CFuUXBZIkM7YOWwlJu4OrcjrJSTk01-Zc3N75kYSR4,1682
5
5
  aws_durable_execution_sdk_python_testing/exceptions.py,sha256=ZgFPDtKgBn4-tj7fqaye901CksNQWL9RmMhgJBhEu_U,9110
6
6
  aws_durable_execution_sdk_python_testing/execution.py,sha256=pWawO619mE6uEEEMrgtmNVI155uapIrHJCx0NhwjLTE,17448
7
- aws_durable_execution_sdk_python_testing/executor.py,sha256=_bLR1MaNJRnmYdmepM5c-9iRIus-792Lr2M3cQPd1KA,47794
7
+ aws_durable_execution_sdk_python_testing/executor.py,sha256=EOWLFXzRgd_h2lz0Smb5wvgPeDcruG11Q32a0vdztEw,48548
8
8
  aws_durable_execution_sdk_python_testing/invoker.py,sha256=s-PR-EEBSosamAqgEyQX_1Mq7_QZ-X6N_3Z-e4uUmec,13210
9
9
  aws_durable_execution_sdk_python_testing/model.py,sha256=__3Vtq6n_FgcdRd0SbWN30y6eUcw9p7nj_agEX3KD1g,120112
10
10
  aws_durable_execution_sdk_python_testing/observer.py,sha256=32MOYOfrmlKRqbfTXTM7m22iT38U2oYLGUkp7ar4Kvw,4935
@@ -44,9 +44,9 @@ aws_durable_execution_sdk_python_testing/web/models.py,sha256=B4SKVcTculNsO4Qd53
44
44
  aws_durable_execution_sdk_python_testing/web/routes.py,sha256=AU9fMhuR0HF9fltNZ6TZMNOueQc8wEeNyJqoBpMctm0,19466
45
45
  aws_durable_execution_sdk_python_testing/web/serialization.py,sha256=QZ1k5ilu6v9yVCZizJ43yTK8ix3nVGy4hBSfAX-DYO4,8253
46
46
  aws_durable_execution_sdk_python_testing/web/server.py,sha256=DQWwgyb_GKkHbFw_OYgPG1o7uIZ4-sG7F-GAUclLYu0,8853
47
- aws_durable_execution_sdk_python_testing-1.0.0.post1.dist-info/METADATA,sha256=Qrefbwelvox3rURxK3ONyieBjQubvFsWF68ISLr8HkQ,8729
48
- aws_durable_execution_sdk_python_testing-1.0.0.post1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
49
- aws_durable_execution_sdk_python_testing-1.0.0.post1.dist-info/entry_points.txt,sha256=fMm3DMHWb7k4-PSseaQ-BjUxNV_3Z7RyJaDVSwqnkEo,87
50
- aws_durable_execution_sdk_python_testing-1.0.0.post1.dist-info/licenses/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
51
- aws_durable_execution_sdk_python_testing-1.0.0.post1.dist-info/licenses/NOTICE,sha256=1CkO1kwu3Q_OHYTj-d-yiBJA_lNN73a4zSntavaD4oc,67
52
- aws_durable_execution_sdk_python_testing-1.0.0.post1.dist-info/RECORD,,
47
+ aws_durable_execution_sdk_python_testing-1.0.0.post2.dist-info/METADATA,sha256=Gt1xhcRQadbhDVWB9t0EQCYhEmLO_SuBb1tZVjXXQlE,8717
48
+ aws_durable_execution_sdk_python_testing-1.0.0.post2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
49
+ aws_durable_execution_sdk_python_testing-1.0.0.post2.dist-info/entry_points.txt,sha256=fMm3DMHWb7k4-PSseaQ-BjUxNV_3Z7RyJaDVSwqnkEo,87
50
+ aws_durable_execution_sdk_python_testing-1.0.0.post2.dist-info/licenses/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
51
+ aws_durable_execution_sdk_python_testing-1.0.0.post2.dist-info/licenses/NOTICE,sha256=1CkO1kwu3Q_OHYTj-d-yiBJA_lNN73a4zSntavaD4oc,67
52
+ aws_durable_execution_sdk_python_testing-1.0.0.post2.dist-info/RECORD,,