Skip to content

Commit

Permalink
Adds SnipSync for Python's Activity Retry (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
rachfop authored Aug 16, 2022
1 parent 0b1c586 commit 7f2f9b7
Showing 1 changed file with 2 additions and 0 deletions.
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

0 comments on commit 7f2f9b7

Please sign in to comment.