Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Nov 25, 2024
1 parent 14bce90 commit bd524ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions polling/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit bd524ab

Please sign in to comment.