From 908b08d765ab405e86c685932f371bc332a34d28 Mon Sep 17 00:00:00 2001 From: Patrick Rachford <64233065+rachfop@users.noreply.github.com> Date: Tue, 16 Aug 2022 12:00:58 -0700 Subject: [PATCH] Adds SnipSync for Python's Activity Retry --- hello/hello_activity_retry.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hello/hello_activity_retry.py b/hello/hello_activity_retry.py index 2279c264..233f9613 100644 --- a/hello/hello_activity_retry.py +++ b/hello/hello_activity_retry.py @@ -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():