Skip to content

Commit 4acb0f8

Browse files
committed
fix: rename wait options model from seconds to wait_seconds
1 parent c1bc794 commit 4acb0f8

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/aws_durable_execution_sdk_python/lambda_service.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,14 @@ def to_dict(self) -> MutableMapping[str, Any]:
219219

220220
@dataclass(frozen=True)
221221
class WaitOptions:
222-
seconds: int = 0
222+
wait_seconds: int = 0
223+
224+
@classmethod
225+
def from_dict(cls, data: MutableMapping[str, Any]) -> WaitOptions:
226+
return cls(wait_seconds=data.get("WaitSeconds", 0))
223227

224228
def to_dict(self) -> MutableMapping[str, Any]:
225-
return {"WaitSeconds": self.seconds}
229+
return {"WaitSeconds": self.wait_seconds}
226230

227231

228232
@dataclass(frozen=True)

src/aws_durable_execution_sdk_python/operation/wait.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def wait_handler(
4343
if not checkpointed_result.is_existent():
4444
operation = OperationUpdate.create_wait_start(
4545
identifier=operation_identifier,
46-
wait_options=WaitOptions(seconds=seconds),
46+
wait_options=WaitOptions(wait_seconds=seconds),
4747
)
4848
state.create_checkpoint(operation_update=operation)
4949

0 commit comments

Comments
 (0)