Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions hello/hello_activity_retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ async def run(self, name: str) -> str:
# for an unlimited amount of time and an unlimited number of attempts.
# We'll keep those defaults except we'll set the maximum interval to
# just 2 seconds.
# @@@SNIPSTART python-activity-retry
return await workflow.execute_activity(
compose_greeting,
ComposeGreetingInput("Hello", name),
start_to_close_timeout=timedelta(seconds=10),
retry_policy=RetryPolicy(maximum_interval=timedelta(seconds=2)),
)
# @@@SNIPEND


async def main():
Expand Down