From bd524ab7402b753afc27dc5bf14a5c3b4341b01d Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Mon, 25 Nov 2024 15:43:35 -0500 Subject: [PATCH] Clean up --- polling/test_service.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/polling/test_service.py b/polling/test_service.py index 9227b8f4..490f8476 100644 --- a/polling/test_service.py +++ b/polling/test_service.py @@ -14,10 +14,10 @@ class ComposeGreetingInput: async def get_service_result(input): - attempts[activity.info().workflow_id] += 1 - attempt = attempts[activity.info().workflow_id] + workflow_id = activity.info().workflow_id + attempts[workflow_id] += 1 - print(f"Attempt {attempt} of {ERROR_ATTEMPTS} to invoke service") - if attempt == ERROR_ATTEMPTS: + print(f"Attempt {attempts[workflow_id]} of {ERROR_ATTEMPTS} to invoke service") + if attempts[workflow_id] == ERROR_ATTEMPTS: return f"{input.greeting}, {input.name}!" raise Exception("service is down")