We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6de0139 commit b054fd8Copy full SHA for b054fd8
polling/test_service.py
@@ -3,7 +3,7 @@ def __init__(self):
3
self.error_attempts = 5
4
5
async def get_service_result(self, input, attempt: int):
6
- print(f"Attempt {attempt}" f" of {self.error_attempts} to invoke service")
7
- if attempt % self.error_attempts == 0:
+ print(f"Attempt {attempt} of {self.error_attempts} to invoke service")
+ if attempt > self.error_attempts:
8
return f"{input.greeting}, {input.name}!"
9
raise Exception("service is down")
0 commit comments